Make sure we pass all tests

Make sure we pass all tests

--- Pathfinding/PathFinder.cs
+++ Pathfinding/PathFinder.cs
@@ -113,8 +113,6 @@
 							}
 							return false;
 						};
-
-						ConsiderPoint = null;

 						var bestBPoly = BoundaryPolygons.FindClosestPoint(bestAPos, ConsiderPolygon, ConsiderPoint);
 						if (bestBPoly == null)


cleanup

cleanup

--- XtraCs/Labs2.cs
+++ XtraCs/Labs2.cs
@@ -327,7 +327,7 @@

           RoofType roofType = roofTypes
             .Cast<RoofType>()
-            .FirstOrDefault<RoofType>( typ
+            .FirstOrDefault<RoofType>( typ
               => null != typ.GetCompoundStructure() );

           ModelCurveArray modelCurves
@@ -617,10 +617,10 @@
           if( null != element.Category
             && 0 < element.Parameters.Size
             && ( element.Category.HasMaterialQuantities
-              //|| null != element.PhaseCreated ) ) // 2012
+            //|| null != element.PhaseCreated ) ) // 2012
               || !ElementId.InvalidElementId.Equals( // 2013
                 element.CreatedPhaseId ) ) )
-            {
+          {
             if( !categories.ContainsKey(
               element.Category.Name ) )
             {


add committer details to the table too

add committer details to the table too

--- RepoStats/OutputWriter.cs
+++ RepoStats/OutputWriter.cs
@@ -12,8 +12,8 @@
         public static void OutputCheckinDetails(Dictionary<string, GitFileInfo> gitFileInfos, Dictionary<string, GitCommitterInfo> gitComitterInfos)
         {
             string fileInfoChangesTableString = tableTemplate;
-
             StringBuilder trFileInfosContent = new StringBuilder();
+
             foreach (GitFileInfo fileInfo in gitFileInfos.Values.OrderByDescending(c => (c.LinesDeleted + c.LinesAdded)))
             {
                 trFileInfosContent.AppendFormat(
@@ -33,12 +33,35 @@
                     .Replace("%0%", "{0}")
                     .Replace("%1%", "{1}"), trFileInfosContent);

+
+            string committerInfoTableString = tableTemplate;
+            StringBuilder trCommitterInfosContent = new StringBuilder();
+
+            foreach (GitCommitterInfo committerInfo in gitComitterInfos.Values.OrderByDescending(c => (c.LinesDeleted + c.LinesAdded)))
+            {
+                trCommitterInfosContent.AppendFormat(
+                    trTemplate,
+                    committerInfo.LinesAdded,
+                    committerInfo.LinesDeleted,
+                    committerInfo.NumberOfCommits,
+                    committerInfo.Author);
+            }
+
+            committerInfoTableString = String.Format(
+                committerInfoTableString
+                    .Replace("{0}", "%0%")
+                    .Replace("{1}", "%1%")
+                    .Replace("{", "{{")
+                    .Replace("}", "}}")
+                    .Replace("%0%", "{0}")
+                    .Replace("%1%", "{1}"), trCommitterInfosContent);
+
             File.WriteAllText("report.html",
                 String.Concat(
                     htmlPreTemplate,
                     fileInfoChangesTableString,
                     tableFillerTemplate,
-                    fileInfoChangesTableString,
+                    committerInfoTableString,
                     htmlPostTemplate));
         }


Tidied up code and commenting in the Resolver library

--- Resolution/Transformer.cs
+++ Resolution/Transformer.cs
@@ -39,12 +39,12 @@
         internal static readonly SchemaStrongNameCache SchemaStrongNameCache = new SchemaStrongNameCache();

         /// <summary>
-        /// Apply a map to a an aggregation of two XML messages
+        /// Apply a map to an aggregation of two XML messages
         /// </summary>
         /// <param name="mapFullName">Map full name (Class, strong name)</param>
         /// <param name="messageIn1">The first XML message to be transformed</param>
         /// <param name="messageIn2">The second XML message to be transformed</param>
-        /// <returns>The transformed xml document</returns>
+        /// <returns>The transformed XML document</returns>
         public static TransformResults Transform(string mapFullName, XmlDocument messageIn1, XmlDocument messageIn2)
         {
             var merge = new XmlDocument();
@@ -207,7 +207,7 @@
                 // Return the msg out
                 msgOut.LoadXml(writer.ToString());

-                transformResults = new TransformResults(messageIn, msgOut, xslDoc, xslArgList, sourceSchemas, targetSchemas, (from schemaName in targetSchemas select SchemaStrongNameCache.GetSchemaStrongName(map.GetType(), schemaName)).ToList<string>());
+                transformResults = new TransformResults(messageIn, msgOut, xslDoc, xslArgList, sourceSchemas, targetSchemas, (from schemaName in targetSchemas select SchemaStrongNameCache.GetSchemaStrongName(map.GetType(), schemaName)).ToList());
             }
             finally
             {


Respond to PR feedback

Respond to PR feedback

--- src/Agent.Worker/CodeCoverage/CodeCoverageCommands.cs
+++ src/Agent.Worker/CodeCoverage/CodeCoverageCommands.cs
@@ -299,8 +299,8 @@
                 }
                 catch (Exception ex)
                 {
-                    Exception exToReport = ex.InnerException == null ? ex : ex.InnerException;
-                    executionContext.Warning(StringUtil.Loc("RenameIndexFileCoberturaFailed", htmIndexFile, defaultIndexFile, _codeCoverageTool, exToReport.ToString()));
+                    // In the warning text, prefer using ex.InnerException when available, for more-specific details
+                    executionContext.Warning(StringUtil.Loc("RenameIndexFileCoberturaFailed", htmIndexFile, defaultIndexFile, _codeCoverageTool, (ex.InnerException ?? ex).ToString()));
                 }
             }
         }
@@ -330,8 +330,8 @@
             }
             catch (Exception ex)
             {
-                Exception exToReport = ex.InnerException == null ? ex : ex.InnerException;
-                executionContext.Warning(StringUtil.Loc("RenameIndexFileCoberturaFailed", CodeCoverageConstants.DefaultNonFrameFileCobertura, CodeCoverageConstants.DefaultIndexFile, _codeCoverageTool, exToReport.ToString()));
+                // In the warning text, prefer using ex.InnerException when available, for more-specific details
+                executionContext.Warning(StringUtil.Loc("RenameIndexFileCoberturaFailed", CodeCoverageConstants.DefaultNonFrameFileCobertura, CodeCoverageConstants.DefaultIndexFile, _codeCoverageTool, (ex.InnerException ?? ex).ToString()));
             }
         }


Add Toggle On and Off properties to PropertySet

--- src/AppStudio.Uwp/Controls/PropertySet/PropertySet.cs
+++ src/AppStudio.Uwp/Controls/PropertySet/PropertySet.cs
@@ -83,6 +83,25 @@
         public static readonly DependencyProperty SmallChangeProperty = DependencyProperty.Register("SmallChange", typeof(double), typeof(PropertySet), new PropertyMetadata(1.0));
         #endregion

+        #region ToggleOnContent
+        public object ToggleOnContent
+        {
+            get { return (object)GetValue(ToggleOnContentProperty); }
+            set { SetValue(ToggleOnContentProperty, value); }
+        }
+
+        public static readonly DependencyProperty ToggleOnContentProperty = DependencyProperty.Register("ToggleOnContent", typeof(string), typeof(PropertySet), new PropertyMetadata(null));
+        #endregion
+
+        #region ToggleOffContent
+        public object ToggleOffContent
+        {
+            get { return (object)GetValue(ToggleOffContentProperty); }
+            set { SetValue(ToggleOffContentProperty, value); }
+        }
+        public static readonly DependencyProperty ToggleOffContentProperty = DependencyProperty.Register("ToggleOffContent", typeof(object), typeof(PropertySet), new PropertyMetadata(null));
+        #endregion
+

         #region ComboItems
         public IEnumerable<KeyValuePair<string, object>> ComboItems
@@ -145,6 +164,14 @@
                     }
                     else if (type == typeof(bool))
                     {
+                        if (ToggleOnContent != null)
+                        {
+                            _toggle.OnContent = ToggleOnContent;
+                        }
+                        if (ToggleOffContent != null)
+                        {
+                            _toggle.OffContent = ToggleOffContent;
+                        }
                         _toggle.Visibility = Visibility.Visible;
                     }
                     else if (type == typeof(string))


Fix formalname reference for consistency in sampleinfo

--- src/ArcGISRuntime.Samples.Shared/Models/SampleInfo.cs
+++ src/ArcGISRuntime.Samples.Shared/Models/SampleInfo.cs
@@ -31,7 +31,7 @@
         {
             get
             {
-                return System.IO.Path.Combine(_pathStub, "Samples", Category, SampleType.Name);
+                return System.IO.Path.Combine(_pathStub, "Samples", Category, FormalName);
             }
         }


SDKヴァージョン記載

SDKヴァージョン記載

--- NCMB/CommonConstant.cs
+++ NCMB/CommonConstant.cs
@@ -41,7 +41,7 @@
 		public static readonly string DOMAIN_URL = "https://mb.api.cloud.nifty.com";//ドメインのURL

 		public static readonly string API_VERSION = "2013-09-01";//APIバージョン
-		public static readonly string SDK_VERSION = "1.1.3"; //SDKバージョン
+		public static readonly string SDK_VERSION = "1.1.4"; //SDKバージョン
 		//DEBUG LOG Setting: NCMBDebugにてdefine設定をしてください
 	}
 }


Fix indentation and add comments in DotNetSdkTests

--- src/Compilers/Core/MSBuildTaskTests/DotNetSdkTests.cs
+++ src/Compilers/Core/MSBuildTaskTests/DotNetSdkTests.cs
@@ -409,7 +409,8 @@
             VerifyValues(
                 customProps: @"
 <PropertyGroup>
-    <GenerateMSBuildEditorConfigFile>false</GenerateMSBuildEditorConfigFile>
+  <!-- Disable automatic global .editorconfig generation by the SDK -->
+  <GenerateMSBuildEditorConfigFile>false</GenerateMSBuildEditorConfigFile>
 </PropertyGroup>",
                 customTargets: null,
                 targets: new[]
@@ -468,7 +469,8 @@
             VerifyValues(
                 customProps: @"
 <PropertyGroup>
-    <GenerateMSBuildEditorConfigFile>false</GenerateMSBuildEditorConfigFile>
+  <!-- Disable automatic global .editorconfig generation by the SDK -->
+  <GenerateMSBuildEditorConfigFile>false</GenerateMSBuildEditorConfigFile>
 </PropertyGroup>",
                 customTargets: null,
                 targets: new[]
@@ -501,8 +503,9 @@
             VerifyValues(
                 customProps: @"
 <PropertyGroup>
-    <DiscoverGlobalAnalyzerConfigFiles>false</DiscoverGlobalAnalyzerConfigFiles>
-    <GenerateMSBuildEditorConfigFile>false</GenerateMSBuildEditorConfigFile>
+  <DiscoverGlobalAnalyzerConfigFiles>false</DiscoverGlobalAnalyzerConfigFiles>
+  <!-- Disable automatic global .editorconfig generation by the SDK -->
+  <GenerateMSBuildEditorConfigFile>false</GenerateMSBuildEditorConfigFile>
 </PropertyGroup>",
                 customTargets: null,
                 targets: new[]
@@ -533,8 +536,9 @@
             VerifyValues(
                 customProps: @"
 <PropertyGroup>
-    <DiscoverEditorConfigFiles>false</DiscoverEditorConfigFiles>
-    <GenerateMSBuildEditorConfigFile>false</GenerateMSBuildEditorConfigFile>
+  <DiscoverEditorConfigFiles>false</DiscoverEditorConfigFiles>
+  <!-- Disable automatic global .editorconfig generation by the SDK -->
+  <GenerateMSBuildEditorConfigFile>false</GenerateMSBuildEditorConfigFile>
 </PropertyGroup>",
                 customTargets: null,
                 targets: new[]
@@ -595,6 +599,7 @@
             VerifyValues(
                 customProps: @"
   <PropertyGroup>
+    <!-- Disable automatic global .editorconfig generation by the SDK -->
     <DiscoverEditorConfigFiles>false</DiscoverEditorConfigFiles>
     <DiscoverGlobalAnalyzerConfigFiles>false</DiscoverGlobalAnalyzerConfigFiles>
     <GenerateMSBuildEditorConfigFile>false</GenerateMSBuildEditorConfigFile>
@@ -619,8 +624,10 @@
 some_prop = some_val");

             VerifyValues(
+                // Disable automatic global .editorconfig generation by the SDK
                 customProps: @"
   <PropertyGroup>
+    <!-- Disable automatic global .editorconfig generation by the SDK -->
     <GenerateMSBuildEditorConfigFile>false</GenerateMSBuildEditorConfigFile>
   </PropertyGroup>
   <ItemGroup>


woopsy daisy, fixed order

woopsy daisy, fixed order

--- NadekoBot/NadekoBot.cs
+++ NadekoBot/NadekoBot.cs
@@ -83,11 +83,12 @@
             //reply to personal messages and forward if enabled.
             client.MessageReceived += Client_MessageReceived;

-            //count commands ran
-            client.Commands().CommandExecuted += (s, e) => commandsRan++;

             //add command service
             var commands = client.Services.Add<CommandService>(commandService);
+
+            //count commands ran
+            client.Commands().CommandExecuted += (s, e) => commandsRan++;

             //create module service
             var modules = client.Services.Add<ModuleService>(new ModuleService());


MAJOR Changed how CreateParent works

MAJOR Changed how CreateParent works

--- NoteDataXML_Worklog.cs
+++ NoteDataXML_Worklog.cs
@@ -21,9 +21,9 @@
 			base.CommonConstructorBehavior ();
 			Caption = Loc.Instance.GetString("Worklog");
 		}
-		public override void CreateParent (Layout.LayoutPanelBase Layout)
+		protected override void DoBuildChildren (LayoutPanelBase Layout)
 		{
-			base.CreateParent (Layout);
+			base.DoBuildChildren (Layout);
 			properties.DropDownItems.Add (new ToolStripSeparator ());
 			CaptionLabel.Dock = DockStyle.Top;


Try to make tests pass on AppVeyor

Try to make tests pass on AppVeyor

--- src/Abc.Zebus.Tests/Transport/ZmqTransportTests.cs
+++ src/Abc.Zebus.Tests/Transport/ZmqTransportTests.cs
@@ -602,12 +602,12 @@
             configurationMock.SetupGet(x => x.WaitForEndOfStreamAckTimeout).Returns(100.Milliseconds());

             if (peerId == null)
-                peerId = "Abc.Testing." + _transports.Count;
+                peerId = $"Abc.Testing.{Guid.NewGuid():N}";

             var transport = new ZmqTransport(configurationMock.Object, new ZmqSocketOptions(), new DefaultZmqOutboundSocketErrorHandler());
             transport.SetLogId(_transports.Count);

-            transport.SocketOptions.SendTimeout = 10.Milliseconds();
+            transport.SocketOptions.SendTimeout = 500.Milliseconds();
             _transports.Add(transport);

             transport.Configure(new PeerId(peerId), environment);


Removed extraneous whitespace

Removed extraneous whitespace

--- MimeKit/Encodings/Base64Encoder.cs
+++ MimeKit/Encodings/Base64Encoder.cs
@@ -209,7 +209,6 @@
 					saved2 = *inptr++;
 					saved = 2;
 				}
-
 			}

 			return (int) (outptr - output);
@@ -257,7 +256,7 @@
 		unsafe int Flush (byte* input, int length, byte* output)
 		{
 			byte* outptr = output;
-
+
 			if (length > 0)
 				outptr += Encode (input, length, output);


装備の色を独自に変更

装備の色を独自に変更

--- Miotsukushi/Tools/KanColleTools.cs
+++ Miotsukushi/Tools/KanColleTools.cs
@@ -34,40 +34,45 @@
         {
             switch (equiptype)
             {
-                case 1: return Brushes.Salmon;
-                case 2: return Brushes.Tomato;
-                case 3: return Brushes.Crimson;
-                case 4: return Brushes.Yellow;
-                case 5: return Brushes.SteelBlue;
-                case 6: return Brushes.ForestGreen;
-                case 7: return Brushes.IndianRed;
-                case 8: return Brushes.CornflowerBlue;
-                case 9: return Brushes.Gold;
-                case 10: return Brushes.Honeydew;
-                case 11: return Brushes.MintCream;
-                case 12: return Brushes.Goldenrod;
-                case 13: return Brushes.Goldenrod;
-                case 14: return Brushes.SkyBlue;
-                case 15: return Brushes.PowderBlue;
-                case 16: return Brushes.LightGreen;
-                case 17: return Brushes.Gold;
-                case 18: return Brushes.MediumSeaGreen;
-                case 19: return Brushes.Tomato;
-                case 20: return Brushes.White;
-                case 21: return Brushes.PaleGreen;
-                case 22: return Brushes.SteelBlue;
-                case 23: return Brushes.Gainsboro;
-                case 24: return Brushes.OliveDrab;
-                case 25: return Brushes.LimeGreen;
-                case 26: return Brushes.LightSkyBlue;
-                case 27: return Brushes.MediumPurple;
-                case 28: return Brushes.MediumPurple;
-                case 29: return Brushes.DarkOrange;
-                case 30: return Brushes.DarkGray;
-                case 31: return Brushes.HotPink;
-                case 32: return Brushes.SteelBlue;
-                case 33: return Brushes.Orange;
-                default: return Brushes.White;
+                case 1: return new SolidColorBrush(Color.FromRgb(209, 91, 91)); // 小口径主砲
+                case 2: return new SolidColorBrush(Color.FromRgb(204, 61, 61)); // 中口径主砲
+                case 3: return new SolidColorBrush(Color.FromRgb(194, 34, 34)); // 大口径主砲
+                case 4: return new SolidColorBrush(Color.FromRgb(255, 234, 0)); // 副砲
+                case 5: return new SolidColorBrush(Color.FromRgb(88, 135, 171)); // 魚雷
+                case 6: return new SolidColorBrush(Color.FromRgb(102, 204, 119)); // 艦上戦闘機
+                case 7: return new SolidColorBrush(Color.FromRgb(243, 109, 109)); // 艦上爆撃機
+                case 8: return new SolidColorBrush(Color.FromRgb(101, 188, 255)); // 艦上攻撃機
+                case 9: return new SolidColorBrush(Color.FromRgb(255, 192, 0)); // 艦上偵察機
+                case 10: return new SolidColorBrush(Color.FromRgb(140, 200, 150)); // 水上偵察機
+                case 11: return new SolidColorBrush(Color.FromRgb(140, 200, 150)); // 水上爆撃機
+                case 12: return new SolidColorBrush(Color.FromRgb(229, 152, 53)); // 小型電探
+                case 13: return new SolidColorBrush(Color.FromRgb(229, 152, 53)); // 大型電探
+                case 14: return new SolidColorBrush(Color.FromRgb(90, 171, 184)); // ソナー
+                case 15: return new SolidColorBrush(Color.FromRgb(127, 204, 216)); // 爆雷
+                case 16: return new SolidColorBrush(Color.FromRgb(154, 127, 175)); // 追加装甲
+                case 17: return new SolidColorBrush(Color.FromRgb(255, 196, 77)); // 機関部強化
+                case 18: return new SolidColorBrush(Color.FromRgb(96, 190, 113)); // 対空強化弾
+                case 19: return new SolidColorBrush(Color.FromRgb(209, 91, 91)); // 対艦強化弾
+                case 20: return new SolidColorBrush(Color.FromRgb(218, 200, 176)); // VT信管
+                case 21: return new SolidColorBrush(Color.FromRgb(102, 203, 119)); // 対空機銃
+                case 22: return new SolidColorBrush(Color.FromRgb(88, 135, 171)); // 特殊潜航艇（甲標的）
+                case 23: return new SolidColorBrush(Color.FromRgb(255, 255, 255)); // 応急修理要員
+                case 24: return new SolidColorBrush(Color.FromRgb(154, 165, 93)); // 上陸用舟艇
+                case 25: return new SolidColorBrush(Color.FromRgb(102, 204, 119)); // オートジャイロ
+                case 26: return new SolidColorBrush(Color.FromRgb(127, 204, 216)); // 対潜哨戒機
+                case 27: return new SolidColorBrush(Color.FromRgb(154, 127, 175)); // 追加装甲（中型）
+                case 28: return new SolidColorBrush(Color.FromRgb(154, 127, 175)); // 追加装甲（大型）
+                case 29: return new SolidColorBrush(Color.FromRgb(231, 107, 25)); // 探照灯
+                case 30: return new SolidColorBrush(Color.FromRgb(163, 163, 163)); // 簡易輸送部材
+                case 31: return new SolidColorBrush(Color.FromRgb(176, 157, 127)); // 艦艇修理施設
+                case 32: return new SolidColorBrush(Color.FromRgb(88, 135, 171)); // 潜水艦魚雷
+                case 33: return new SolidColorBrush(Color.FromRgb(255, 155, 0)); // 照明弾
+                case 34: return new SolidColorBrush(Color.FromRgb(200, 170, 255)); // 司令部施設
+                case 35: return new SolidColorBrush(Color.FromRgb(205, 162, 105)); // 航空要員
+                case 36: return new SolidColorBrush(Color.FromRgb(137, 154, 77)); // 高射装置
+                case 37: return new SolidColorBrush(Color.FromRgb(255, 54, 54)); // 対地装備
+                case 38: return new SolidColorBrush(Color.FromRgb(194, 34, 34)); // 大口径主砲(II)
+                default: return Brushes.Transparent;
             }
         }


MumbleSharp: [fix] personal message

MumbleSharp: [fix] personal message

--- MumbleSharp/BasicMumbleProtocol.cs
+++ MumbleSharp/BasicMumbleProtocol.cs
@@ -401,9 +401,9 @@
             if (!UserDictionary.TryGetValue(textMessage.actor, out user))   //If we don't know the user for this packet, just ignore it
                 return;

-            if (textMessage.channel_id == null)
-            {
-                if (textMessage.tree_id == null)
+            if (textMessage.channel_id == null || textMessage.channel_id.Count == 0)
+            {
+                if (textMessage.tree_id == null || textMessage.tree_id.Count == 0)
                 {
                     //personal message: no channel, no tree
                     PersonalMessageReceived(new PersonalMessage(user, string.Join("", textMessage.message)));


Fix packet parsing error if npcap loopback adapter installed. Add support for proxy/vpn via npcap loopback adapter. (More efficient alternative to raw sockets)

--- NetworkSniffer/IpSnifferWinPcap.cs
+++ NetworkSniffer/IpSnifferWinPcap.cs
@@ -8,6 +8,7 @@
 using System.Reflection;
 using log4net;
 using PacketDotNet;
+using PacketDotNet.Utils;
 using SharpPcap;
 using SharpPcap.WinPcap;

@@ -96,9 +97,16 @@

         void device_OnPacketArrival(object sender, CaptureEventArgs e)
         {
-            var linkPacket = Packet.ParsePacket(e.Packet.LinkLayerType, e.Packet.Data);
-
-            var ipPacket = linkPacket.PayloadPacket as IpPacket;
+            IPv4Packet ipPacket;
+            if (e.Packet.LinkLayerType != LinkLayers.Null)
+            {
+                var linkPacket = Packet.ParsePacket(e.Packet.LinkLayerType, e.Packet.Data);
+                ipPacket = linkPacket.PayloadPacket as IPv4Packet;
+            }
+            else
+            {
+                ipPacket = new IPv4Packet(new ByteArraySegment(e.Packet.Data, 4, e.Packet.Data.Length - 4));
+            }
             if (ipPacket == null)
                 return;


Addressed isInput and isOutput inaccurately returning true

--- Node_Editor/Framework/Core/Node.cs
+++ Node_Editor/Framework/Core/Node.cs
@@ -376,7 +376,7 @@
 		public bool isInput()
 		{
 			for (int i = 0; i < inputPorts.Count; i++)
-				if (!inputPorts[i].connected())
+				if (inputPorts[i].connected())
 					return false;
 			return true;
 		}
@@ -387,7 +387,7 @@
 		public bool isOutput()
 		{
 			for (int i = 0; i < outputPorts.Count; i++)
-				if (!outputPorts[i].connected())
+				if (outputPorts[i].connected())
 					return false;
 			return true;
 		}


revert adding route tag to controller

revert adding route tag to controller

--- src/FilterLists.Api/V1/Controllers/ListsController.cs
+++ src/FilterLists.Api/V1/Controllers/ListsController.cs
@@ -6,7 +6,6 @@
 namespace FilterLists.Api.V1.Controllers
 {
     [ApiVersion("1.0")]
-    [Route("[controller]")]
     [Produces("application/json")]
     [ResponseCache(CacheProfileName = "Long-Lived")]
     public class ListsController : Controller


Additional safety check for plugin timeouts

--- Oxide.Ext.CSharp/CompilableFile.cs
+++ Oxide.Ext.CSharp/CompilableFile.cs
@@ -104,6 +104,11 @@

         internal void OnCompilationFailed()
         {
+            if (timeoutTimer == null)
+            {
+                Interface.Oxide.LogWarning($"Ignored unexpected plugin compilation failure: {Name}");
+                return;
+            }
             timeoutTimer?.Destroy();
             timeoutTimer = null;
             compilationQueuedAt = 0f;


Update Extensions.cs

Update Extensions.cs

--- SQLMinimal/Extensions.cs
+++ SQLMinimal/Extensions.cs
@@ -125,8 +125,10 @@
         switch (type.Name) {
             case "String": return value.ToString();
             case "Boolean": return System.Convert.ToBoolean(value);
+            case "Int": case "Int32": return System.Convert.ToInt32(value);
+            case "DateTime": return System.Convert.ToDateTime(value);
         }

         return value;
     }
-}+}


navbar active

navbar active

--- src/FlexHtmlHelper.Sample/Views/Shared/_Layout.cshtml
+++ src/FlexHtmlHelper.Sample/Views/Shared/_Layout.cshtml
@@ -1,6 +1,19 @@
-@{
+@using System.Collections.Generic;
+@{
+    List<KeyValuePair<string, string>> navbar = new List<KeyValuePair<string, string>>();
+    navbar.Add(new KeyValuePair<string, string>("Grid", "Row"));
+    navbar.Add(new KeyValuePair<string, string>("Input", "Label"));
+    navbar.Add(new KeyValuePair<string, string>("Form", "Default"));
+    navbar.Add(new KeyValuePair<string, string>("Link", "Link"));
+    navbar.Add(new KeyValuePair<string, string>("Button", "Button"));
+    navbar.Add(new KeyValuePair<string, string>("Icon", "Icon"));
+    navbar.Add(new KeyValuePair<string, string>("Table", "Table"));
+    navbar.Add(new KeyValuePair<string, string>("JavaScript", "Collapse"));
+    navbar.Add(new KeyValuePair<string, string>("Tag", "Tag"));
+
     var menu = (List<KeyValuePair<string, string>>)ViewBag.menu;
-    ViewBag.Title = @Html.ViewContext.RouteData.Values["controller"].ToString() + " " + @Html.ViewContext.RouteData.Values["action"].ToString();
+    ViewBag.Title = @Html.ViewContext.RouteData.Values["controller"].ToString() + " " + @Html.ViewContext.RouteData.Values["action"].ToString();
+
 }
 <!DOCTYPE html>

@@ -24,15 +37,10 @@

-
@Html.ActionLink("Grid", "Row", "Grid")

-
@Html.ActionLink("Input", "Label", "Input")

-
@Html.ActionLink("Form", "Default", "Form")

-
@Html.ActionLink("Link", "Link", "Link")

-
@Html.ActionLink("Button", "Button", "Button")

-
@Html.ActionLink("Icon", "Icon", "Icon")

-
@Html.ActionLink("Table", "Table", "Table")

-
@Html.ActionLink("JavaScript", "Collapse", "JavaScript")

-
@Html.ActionLink("Tag", "Tag", "Tag")

+                    @foreach (var item in navbar)
+                    {
+
@Html.ActionLink(item.Key, item.Value, item.Key)

+                    }


Error handling for invalid assembly references Do not freeze boot up when an existing referenced assembly is invalid Removed unused variable warning

--- Oxide.Ext.CSharp/PluginCompiler.cs
+++ Oxide.Ext.CSharp/PluginCompiler.cs
@@ -64,7 +64,7 @@
                 source_lines = File.ReadAllLines(plugin.ScriptPath);
                 waitingForAccess = false;
             }
-            catch (IOException ex)
+            catch (IOException)
             {
                 if (!waitingForAccess)
                 {
@@ -93,10 +93,21 @@
                     continue;
                 }

+                Assembly assembly;
+                try
+                {
+                    assembly = Assembly.Load(assembly_name);
+                }
+                catch (FileNotFoundException)
+                {
+                    Interface.GetMod().LogInfo("Assembly referenced by {0} plugin is invalid: {1}.dll", plugin.Name, assembly_name);
+                    continue;
+                }
+
                 references.Add(assembly_name);

                 // Include references made by the referenced assembly
-                foreach (var reference in Assembly.Load(assembly_name).GetReferencedAssemblies())
+                foreach (var reference in assembly.GetReferencedAssemblies())
                     references.Add(reference.Name);
             }


Fixed up RDS.xml generation.

Fixed up RDS.xml generation.

--- src/FunnelWeb.Web/Controllers/MetaWeblogController.cs
+++ src/FunnelWeb.Web/Controllers/MetaWeblogController.cs
@@ -1,7 +1,9 @@
 using System;
 using System.IO;
+using System.Text;
 using System.Web;
 using System.Web.Mvc;
+using System.Xml;
 using System.Xml.Linq;

 namespace FunnelWeb.Web.Controllers
@@ -21,27 +23,25 @@

         public ActionResult Rsd()
         {
-            using (var writer = new StringWriter())
-            {
-                var root = (HttpContext.Request.IsSecureConnection ? "https://" : "http://") + HttpContext.Request.Url.Authority;
-                var homepage = root + VirtualPathUtility.ToAbsolute("~/");
-                var api = root + VirtualPathUtility.ToAbsolute("~/blogapi");
-                new XDocument(
-                    new XElement(XName.Get("rsd", "http://tales.phrasewise.com/rfc/rsd"), new XAttribute("version", "1.0"),
-                                 new XElement("service",
-                                              new XElement("engineName", "FunnelWeblog"),
-                                              new XElement("engineLink", "http://www.funnelweblog.com/"),
-                                              new XElement("homePageLink", homepage),
-                                              new XElement("apis",
-                                                           new XElement("api",
-                                                                        new XAttribute("name", "MetaWeblog"),
-                                                                        new XAttribute("preferred", "true"),
-                                                                        new XAttribute("apiLink", api),
-                                                                        new XAttribute("blogId", "something")))))).Save(writer);
+            const string xmlns = "http://archipelago.phrasewise.com/rsd";
+            var root = (HttpContext.Request.IsSecureConnection ? "https://" : "http://") + HttpContext.Request.Url.Authority;
+            var homepage = root + VirtualPathUtility.ToAbsolute("~/");
+            var api = root + VirtualPathUtility.ToAbsolute("~/blogapi");
+            var rsdFile = new XDocument(
+                new XElement(XName.Get("rsd", xmlns), new XAttribute("version", "1.0"),
+                             new XElement(XName.Get("service", xmlns),
+                                          new XElement(XName.Get("engineName", xmlns), "FunnelWeblog"),
+                                          new XElement(XName.Get("engineLink", xmlns), "http://www.funnelweblog.com/"),
+                                          new XElement(XName.Get("homePageLink", xmlns), homepage),
+                                          new XElement(XName.Get("apis", xmlns),
+                                                       new XElement(XName.Get("api", xmlns),
+                                                                    new XAttribute("name", "MetaWeblog"),
+                                                                    new XAttribute("preferred", "true"),
+                                                                    new XAttribute("apiLink", api),
+                                                                    new XAttribute("blogId", "something"))))))
+                .ToString();

-                var rsdFile = writer.ToString();
-                return Content(rsdFile, "application/rsd+xml");
-            }
+            return Content(rsdFile, "application/rsd+xml", Encoding.Default);
         }
     }
 }


Refactored the variable wrapping code to work with pointers.

--- src/Generator/Generators/CSharp/CSharpTextTemplate.cs
+++ src/Generator/Generators/CSharp/CSharpTextTemplate.cs
@@ -592,27 +592,17 @@
             Setter
         }

-        private string GetPropertyLocation<T>(T decl, PropertyMethodKind kind,
-            out bool isRefClass) where T : Declaration, ITypedDecl
-        {
-            isRefClass = false;
-
-            if (decl is Variable)
-            {
-                var @var = decl as Variable;
-
-                string symbol;
-                if (!FindMangledDeclSymbol(@var, out symbol))
-                    return string.Empty;
-
-                NativeLibrary library;
-                Driver.LibrarySymbols.FindLibraryBySymbol(symbol, out library);
-
-                return string.Format("CppSharp.SymbolResolver.ResolveSymbol(\"{0}\", \"{1}\")",
-                    Path.GetFileNameWithoutExtension(library.FileName), symbol);
-            }
-
-            throw new NotSupportedException();
+        private string GetVariableLocation(Variable @var)
+        {
+            string symbol;
+            if (!FindMangledDeclSymbol(@var, out symbol))
+                return string.Empty;
+
+            NativeLibrary library;
+            Driver.LibrarySymbols.FindLibraryBySymbol(symbol, out library);
+
+            return string.Format("CppSharp.SymbolResolver.ResolveSymbol(\"{0}\", \"{1}\")",
+                Path.GetFileNameWithoutExtension(library.FileName), symbol);
         }

         private void GeneratePropertySetter<T>(T decl, Class @class)
@@ -699,17 +689,24 @@

                 WriteLine("return {0};", marshal.Context.Return);
             }
-            else
-            {
-                bool isRefClass;
-                @return = GetPropertyLocation(decl, PropertyMethodKind.Getter,
-                    out isRefClass);
+            else if (decl is Variable)
+            {
+                var @var = decl as Variable;
+                var location = GetVariableLocation(@var);
+
+                var typePrinter = TypePrinter as CSharpTypePrinter;
+                typePrinter.PushContext(CSharpTypePrinterContextKind.Native);
+
+                WriteLine("var {0} = ({1}*){2};", Helpers.GeneratedIdentifier("ptr"),
+                    @var.Type, location);
+
+                typePrinter.PopContext();

                 var ctx = new CSharpMarshalContext(Driver)
                 {
                     ArgName = decl.Name,
-                    ReturnVarName = @return,
-                    ReturnType = decl.QualifiedType
+                    ReturnVarName = "*" + Helpers.GeneratedIdentifier("ptr"),
+                    ReturnType = new QualifiedType(var.Type)
                 };

                 var marshal = new CSharpMarshalNativeToManagedPrinter(ctx);


Update proeprty comments

Update proeprty comments

--- src/GongSolutions.WPF.DragDrop/DragDrop.Properties.cs
+++ src/GongSolutions.WPF.DragDrop/DragDrop.Properties.cs
@@ -15,7 +15,7 @@
         public static DataFormat DataFormat { get; } = DataFormats.GetDataFormat("GongSolutions.Wpf.DragDrop");

         /// <summary>
-        /// Gets or sets the data format which will be used for the drag and drop actions.
+        /// Gets or sets the data format which will be used for the drag and drop operations.
         /// </summary>
         public static readonly DependencyProperty DataFormatProperty
             = DependencyProperty.RegisterAttached("DataFormat",
@@ -24,7 +24,7 @@
                                                   new PropertyMetadata(DragDrop.DataFormat));

         /// <summary>
-        /// Gets the data format which will be used for the drag and drop actions.
+        /// Gets the data format which will be used for the drag and drop operations.
         /// </summary>
         public static DataFormat GetDataFormat(UIElement source)
         {
@@ -32,7 +32,7 @@
         }

         /// <summary>
-        /// Sets the data format which will be used for the drag and drop actions.
+        /// Sets the data format which will be used for the drag and drop operations.
         /// </summary>
         public static void SetDataFormat(UIElement source, DataFormat value)
         {
@@ -40,7 +40,7 @@
         }

         /// <summary>
-        /// Gets or Sets whether the control can be used as drag source.
+        /// Gets or sets whether the control can be used as drag source.
         /// </summary>
         public static readonly DependencyProperty IsDragSourceProperty
             = DependencyProperty.RegisterAttached("IsDragSource",
@@ -95,7 +95,7 @@
         }

         /// <summary>
-        /// Gets or Sets whether the control can be used as drop target.
+        /// Gets or sets whether the control can be used as drop target.
         /// </summary>
         public static readonly DependencyProperty IsDropTargetProperty
             = DependencyProperty.RegisterAttached("IsDropTarget",
@@ -156,10 +156,13 @@
         }

         /// <summary>
-        /// Gets or sets the events which are subscribed for the drag and drop events
-        /// </summary>
-        public static readonly DependencyProperty DropEventTypeProperty =
-            DependencyProperty.RegisterAttached("DropEventType", typeof(EventType), typeof(DragDrop), new PropertyMetadata(EventType.Auto, DropEventTypeChanged));
+        /// Gets or sets the events which are subscribed for the drag and drop events.
+        /// </summary>
+        public static readonly DependencyProperty DropEventTypeProperty
+            = DependencyProperty.RegisterAttached("DropEventType",
+                                                  typeof(EventType),
+                                                  typeof(DragDrop),
+                                                  new PropertyMetadata(EventType.Auto, DropEventTypeChanged));

         private static void DropEventTypeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
         {
@@ -293,7 +296,7 @@
         }

         /// <summary>
-        /// Gets or Sets whether the control can be used as drag source together with the right mouse.
+        /// Gets or sets whether the control can be used as drag source together with the right mouse.
         /// </summary>
         public static readonly DependencyProperty CanDragWithMouseRightButtonProperty
             = DependencyProperty.RegisterAttached("CanDragWithMouseRightButton",
@@ -349,7 +352,7 @@
         public static IRootElementFinder DefaultRootElementFinder { get; } = new RootElementFinder();

         /// <summary>
-        /// Gets or Sets the handler for the drag action.
+        /// Gets or sets the handler for the drag operation.
         /// </summary>
         public static readonly DependencyProperty DragHandlerProperty
             = DependencyProperty.RegisterAttached("DragHandler",
@@ -357,7 +360,7 @@
                                                   typeof(DragDrop));

         /// <summary>
-        /// Gets the handler for the drag action.
+        /// Gets the handler for the drag operation.
         /// </summary>
         public static IDragSource GetDragHandler(UIElement target)
         {
@@ -365,7 +368,7 @@
         }

         /// <summary>
-        /// Sets the handler for the drag action.
+        /// Sets the handler for the drag operation.
         /// </summary>
         public static void SetDragHandler(UIElement target, IDragSource value)
         {
@@ -373,7 +376,7 @@
         }

         /// <summary>
-        /// Gets or Sets the handler for the drop action.
+        /// Gets or sets the handler for the drop operation.
         /// </summary>
         public static readonly DependencyProperty DropHandlerProperty
             = DependencyProperty.RegisterAttached("DropHandler",
@@ -381,7 +384,7 @@
                                                   typeof(DragDrop));

         /// <summary>
-        /// Gets the handler for the drop action.
+        /// Gets the handler for the drop operation.
         /// </summary>
         public static IDropTarget GetDropHandler(UIElement target)
         {
@@ -389,7 +392,7 @@
         }

         /// <summary>
-        /// Sets the handler for the drop action.
+        /// Sets the handler for the drop operation.
         /// </summary>
         public static void SetDropHandler(UIElement target, IDropTarget value)
         {
@@ -397,7 +400,7 @@
         }

         /// <summary>
-        /// Gets or Sets the ScrollingMode for the drop action.
+        /// Gets or sets the ScrollingMode for the drop operation.
         /// </summary>
         public static readonly DependencyProperty DropScrollingModeProperty
             = DependencyProperty.RegisterAttached("DropScrollingMode",
@@ -406,7 +409,7 @@
                                                   new PropertyMetadata(ScrollingMode.Both));

         /// <summary>
-        /// Gets the ScrollingMode for the drop action.
+        /// Gets the ScrollingMode for the drop operation.
         /// </summary>
         public static ScrollingMode GetDropScrollingMode(UIElement target)
         {
@@ -414,7 +417,7 @@
         }

         /// <summary>
-        /// Sets the ScrollingMode for the drop action.
+        /// Sets the ScrollingMode for the drop operation.
         /// </summary>
         public static void SetDropScrollingMode(UIElement target, ScrollingMode value)
         {
@@ -422,7 +425,7 @@
         }

         /// <summary>
-        /// Gets or Sets whether to show the DropTargetAdorner (DropTargetInsertionAdorner) on an empty target too.
+        /// Gets or sets whether to show the DropTargetAdorner (DropTargetInsertionAdorner) on an empty target too.
         /// </summary>
         public static readonly DependencyProperty ShowAlwaysDropTargetAdornerProperty
             = DependencyProperty.RegisterAttached("ShowAlwaysDropTargetAdorner",
@@ -447,7 +450,7 @@
         }

         /// <summary>
-        /// Gets or Sets the brush for the DropTargetAdorner.
+        /// Gets or sets the brush for the DropTargetAdorner.
         /// </summary>
         public static readonly DependencyProperty DropTargetAdornerBrushProperty
             = DependencyProperty.RegisterAttached("DropTargetAdornerBrush",
@@ -472,7 +475,7 @@
         }

         /// <summary>
-        /// Gets or Sets a context for a control. Only controls with the same context are allowed for drag or drop actions.
+        /// Gets or sets a context for a control. Only controls with the same context are allowed for drag or drop actions.
         /// </summary>
         public static readonly DependencyProperty DragDropContextProperty
             = DependencyProperty.RegisterAttached("DragDropContext",
@@ -497,7 +500,7 @@
         }

         /// <summary>
-        /// Gets or Sets whether an element under the mouse should be ignored for the drag action.
+        /// Gets or sets whether an element under the mouse should be ignored for the drag operation.
         /// </summary>
         public static readonly DependencyProperty DragSourceIgnoreProperty
             = DependencyProperty.RegisterAttached("DragSourceIgnore",
@@ -506,7 +509,7 @@
                                                   new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.Inherits));

         /// <summary>
-        /// Gets whether an element under the mouse should be ignored for the drag action.
+        /// Gets whether an element under the mouse should be ignored for the drag operation.
         /// </summary>
         public static bool GetDragSourceIgnore(UIElement source)
         {
@@ -514,7 +517,7 @@
         }

         /// <summary>
-        /// Sets whether an element under the mouse should be ignored for the drag action.
+        /// Sets whether an element under the mouse should be ignored for the drag operation.
         /// </summary>
         public static void SetDragSourceIgnore(UIElement source, bool value)
         {
@@ -522,7 +525,7 @@
         }

         /// <summary>
-        /// Gets or Sets wheter the drag action should be started only directly on a selected item
+        /// Gets or sets whether the drag action should be started only directly on a selected item.
         /// or also on the free control space (e.g. in a ListBox).
         /// </summary>
         public static readonly DependencyProperty DragDirectlySelectedOnlyProperty
@@ -576,7 +579,7 @@
         }

         /// <summary>
-        /// Gets or Sets whether if the default DragAdorner should be use.
+        /// Gets or sets whether if the default DragAdorner should be use.
         /// </summary>
         public static readonly DependencyProperty UseDefaultDragAdornerProperty
             = DependencyProperty.RegisterAttached("UseDefaultDragAdorner",
@@ -601,7 +604,7 @@
         }

         /// <summary>
-        /// Gets or Sets the opacity of the default DragAdorner.
+        /// Gets or sets the opacity of the default DragAdorner.
         /// </summary>
         public static readonly DependencyProperty DefaultDragAdornerOpacityProperty
             = DependencyProperty.RegisterAttached("DefaultDragAdornerOpacity",
@@ -626,7 +629,7 @@
         }

         /// <summary>
-        /// Gets or Sets the horizontal and vertical proportion at which the pointer will anchor on the DragAdorner.
+        /// Gets or sets the horizontal and vertical proportion at which the pointer will anchor on the DragAdorner.
         /// </summary>
         public static readonly DependencyProperty DragMouseAnchorPointProperty
             = DependencyProperty.RegisterAttached("DragMouseAnchorPoint",
@@ -651,7 +654,7 @@
         }

         /// <summary>
-        /// Gets or Sets the translation transform which will be used for the DragAdorner.
+        /// Gets or sets the translation transform which will be used for the DragAdorner.
         /// </summary>
         public static readonly DependencyProperty DragAdornerTranslationProperty
             = DependencyProperty.RegisterAttached("DragAdornerTranslation",
@@ -676,7 +679,7 @@
         }

         /// <summary>
-        /// Gets or Sets the translation transform which will be used for the EffectAdorner.
+        /// Gets or sets the translation transform which will be used for the EffectAdorner.
         /// </summary>
         public static readonly DependencyProperty EffectAdornerTranslationProperty
             = DependencyProperty.RegisterAttached("EffectAdornerTranslation",
@@ -701,7 +704,7 @@
         }

         /// <summary>
-        /// Gets or Sets a DataTemplate for the DragAdorner.
+        /// Gets or sets a DataTemplate for the DragAdorner.
         /// </summary>
         public static readonly DependencyProperty DragAdornerTemplateProperty
             = DependencyProperty.RegisterAttached("DragAdornerTemplate",
@@ -725,7 +728,7 @@
         }

         /// <summary>
-        /// Gets or Sets a DataTemplate for the DragAdorner based on the DropTarget.
+        /// Gets or sets a DataTemplate for the DragAdorner based on the DropTarget.
         /// </summary>
         public static readonly DependencyProperty DropAdornerTemplateProperty
             = DependencyProperty.RegisterAttached("DropAdornerTemplate",
@@ -749,7 +752,7 @@
         }

         /// <summary>
-        /// Gets or Sets a DataTemplateSelector for the DragAdorner.
+        /// Gets or sets a DataTemplateSelector for the DragAdorner.
         /// </summary>
         public static readonly DependencyProperty DragAdornerTemplateSelectorProperty
             = DependencyProperty.RegisterAttached("DragAdornerTemplateSelector",
@@ -774,7 +777,7 @@
         }

         /// <summary>
-        /// Gets or Sets a DataTemplateSelector for the DragAdorner based on the DropTarget.
+        /// Gets or sets a DataTemplateSelector for the DragAdorner based on the DropTarget.
         /// </summary>
         public static readonly DependencyProperty DropAdornerTemplateSelectorProperty
             = DependencyProperty.RegisterAttached("DropAdornerTemplateSelector",
@@ -824,7 +827,7 @@
         }

         /// <summary>
-        /// Gets or Sets whether if the default DataTemplate for the effects should be use.
+        /// Gets or sets whether if the default DataTemplate for the effects should be use.
         /// </summary>
         public static readonly DependencyProperty UseDefaultEffectDataTemplateProperty
             = DependencyProperty.RegisterAttached("UseDefaultEffectDataTemplate",
@@ -849,7 +852,7 @@
         }

         /// <summary>
-        /// Gets or Sets a EffectAdorner DataTemplate for effect type None.
+        /// Gets or sets a EffectAdorner DataTemplate for effect type None.
         /// </summary>
         public static readonly DependencyProperty EffectNoneAdornerTemplateProperty
             = DependencyProperty.RegisterAttached("EffectNoneAdornerTemplate",
@@ -874,7 +877,7 @@
         }

         /// <summary>
-        /// Gets or Sets a EffectAdorner DataTemplate for effect type Copy.
+        /// Gets or sets a EffectAdorner DataTemplate for effect type Copy.
         /// </summary>
         public static readonly DependencyProperty EffectCopyAdornerTemplateProperty
             = DependencyProperty.RegisterAttached("EffectCopyAdornerTemplate",
@@ -899,7 +902,7 @@
         }

         /// <summary>
-        /// Gets or Sets a EffectAdorner DataTemplate for effect type Move.
+        /// Gets or sets a EffectAdorner DataTemplate for effect type Move.
         /// </summary>
         public static readonly DependencyProperty EffectMoveAdornerTemplateProperty
             = DependencyProperty.RegisterAttached("EffectMoveAdornerTemplate",
@@ -924,7 +927,7 @@
         }

         /// <summary>
-        /// Gets or Sets a EffectAdorner DataTemplate for effect type Link.
+        /// Gets or sets a EffectAdorner DataTemplate for effect type Link.
         /// </summary>
         public static readonly DependencyProperty EffectLinkAdornerTemplateProperty
             = DependencyProperty.RegisterAttached("EffectLinkAdornerTemplate",
@@ -949,7 +952,7 @@
         }

         /// <summary>
-        /// Gets or Sets a EffectAdorner DataTemplate for effect type All.
+        /// Gets or sets a EffectAdorner DataTemplate for effect type All.
         /// </summary>
         public static readonly DependencyProperty EffectAllAdornerTemplateProperty
             = DependencyProperty.RegisterAttached("EffectAllAdornerTemplate",
@@ -974,7 +977,7 @@
         }

         /// <summary>
-        /// Gets or Sets a EffectAdorner DataTemplate for effect type Scroll.
+        /// Gets or sets a EffectAdorner DataTemplate for effect type Scroll.
         /// </summary>
         public static readonly DependencyProperty EffectScrollAdornerTemplateProperty
             = DependencyProperty.RegisterAttached("EffectScrollAdornerTemplate",
@@ -999,9 +1002,9 @@
         }

         /// <summary>
-        /// Gets or Sets the Orientation which should be used for the drag drop action (default null).
-        /// Normally it will be look up to find the correct orientaion of the inner ItemsPanel,
-        /// but sometimes it's necessary to force the oreintation, if the look up is wrong.
+        /// Gets or sets the Orientation which should be used for the drag drop action (default null).
+        /// Normally it will be look up to find the correct orientation of the inner ItemsPanel,
+        /// but sometimes it's necessary to force the orientation, if the look up is wrong.
         /// </summary>
         public static readonly DependencyProperty ItemsPanelOrientationProperty
             = DependencyProperty.RegisterAttached("ItemsPanelOrientation",
@@ -1011,8 +1014,8 @@

         /// <summary>
         /// Gets the Orientation which should be used for the drag drop action (default null).
-        /// Normally it will be look up to find the correct orientaion of the inner ItemsPanel,
-        /// but sometimes it's necessary to force the oreintation, if the look up is wrong.
+        /// Normally it will be look up to find the correct orientation of the inner ItemsPanel,
+        /// but sometimes it's necessary to force the orientation, if the look up is wrong.
         /// </summary>
         public static Orientation? GetItemsPanelOrientation(UIElement source)
         {
@@ -1021,8 +1024,8 @@

         /// <summary>
         /// Sets the Orientation which should be used for the drag drop action (default null).
-        /// Normally it will be look up to find the correct orientaion of the inner ItemsPanel,
-        /// but sometimes it's necessary to force the oreintation, if the look up is wrong.
+        /// Normally it will be look up to find the correct orientation of the inner ItemsPanel,
+        /// but sometimes it's necessary to force the orientation, if the look up is wrong.
         /// </summary>
         public static void SetItemsPanelOrientation(UIElement source, Orientation? value)
         {


Remove unnecessary parameter from ConvertField method.

--- src/Arango/Arango.Client/API/Documents/Document.cs
+++ src/Arango/Arango.Client/API/Documents/Document.cs
@@ -860,7 +860,7 @@
             return this;
         }

-        private object ConvertField(object value, Type type, DateTimeFormat dateTimeFormat = DateTimeFormat.DateTimeObject)
+        private object ConvertField(object value, Type type)
         {
             var valueType = value.GetType();


Fixed grammatical error

Fixed grammatical error

--- src/AudioSwitcher/Presentation/PresenterManager.cs
+++ src/AudioSwitcher/Presentation/PresenterManager.cs
@@ -66,7 +66,7 @@
                 current.Instance.Close();

                 // Current context menu is a toggle and is already
-                // open, let's close it instead opening another
+                // open, let's close it instead of opening another
                 if (current.Metadata.Id == id && current.Metadata.IsToggle)
                     return true;
             }


Fix bad XAML in DesignWindowLoader message.

--- src/Avalonia.DesignerSupport/DesignWindowLoader.cs
+++ src/Avalonia.DesignerSupport/DesignWindowLoader.cs
@@ -56,8 +56,8 @@
                             {
                                 new TextBlock {Text = "Styles can't be previewed without Design.PreviewWith. Add"},
                                 new TextBlock {Text = "<Design.PreviewWith>"},
-                                new TextBlock {Text = "    <Border Padding=20><!-- YOUR CONTROL FOR PREVIEW HERE--></Border>"},
-                                new TextBlock {Text = "<Design.PreviewWith>"},
+                                new TextBlock {Text = "    <Border Padding=20><!-- YOUR CONTROL FOR PREVIEW HERE --></Border>"},
+                                new TextBlock {Text = "</Design.PreviewWith>"},
                                 new TextBlock {Text = "before setters in your first Style"}
                             }
                         };


Fix getting the Absolute path while looking up the TZ files (#17711)

Signed-off-by: dotnet-bot-corefx-mirror <03c4cb6107ae99956a7681f2c97ff7104809a2bd@microsoft.com>

--- src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs
+++ src/Common/src/CoreLib/System/TimeZoneInfo.Unix.cs
@@ -384,8 +384,8 @@
             string symlinkPath = Interop.Sys.ReadLink(tzFilePath);
             if (symlinkPath != null)
             {
-                // Use Path.Combine to resolve links that contain a relative path (e.g. /etc/localtime).
-                symlinkPath = Path.Combine(tzFilePath, symlinkPath);
+                // symlinkPath can be relative path, use Path to get the full absolute path.
+                symlinkPath = Path.GetFullPath(symlinkPath, Path.GetDirectoryName(tzFilePath));

                 string timeZoneDirectory = GetTimeZoneDirectory();
                 if (symlinkPath.StartsWith(timeZoneDirectory, StringComparison.Ordinal))


topological sorting should work properly now

--- src/LearningSystem.App/Controllers/SkillController.cs
+++ src/LearningSystem.App/Controllers/SkillController.cs
@@ -35,7 +35,6 @@
             {
                 var lessons = skill.Lessons.ToList();

-

                 learnedLessons = user.Lessons.Where(x => x.SkillId == skill.SkillId && lessons.Any(y => y.LessonId == x.LessonId));

@@ -71,11 +70,11 @@

         private void TopologicalSort(List<LessonViewModel> sortedLessons, List<Lesson> lessons)
         {
-            HashSet<Lesson> added = new HashSet<Lesson>();
+            Dictionary<Lesson, int> added = new Dictionary<Lesson, int>();
             var parentlessLessons = lessons.Where(x => x.Requirements.Count == 0).ToList();

             sortedLessons.AddRange(parentlessLessons.ToLessonViewModel(0));
-            parentlessLessons.ForEach(x => added.Add(x));
+            parentlessLessons.ForEach(x => added.Add(x, 0));

             int levelInSkillTree = 1;
             int notInPlace = lessons.Count - added.Count;
@@ -84,14 +83,12 @@
             {
                 foreach (var item in lessons)
                 {
-                    if (!added.Contains(item))
+                    if (!added.ContainsKey(item))
                     {
-                        if (item.Requirements.Count == 0 || RequirementsAlreadyAdded(item.Requirements, added))
-                        {
-                            sortedLessons.Add(item.ToLessonViewModel(levelInSkillTree));
-                            added.Add(item);
-                            notInPlace--;
-                        }
+                        int thisLevel = 1 + added.Keys.Intersect(item.Requirements).Max(req => added[req]);
+                        added[item] = thisLevel;
+                        sortedLessons.Add(item.ToLessonViewModel(thisLevel));
+                        notInPlace--;
                     }
                 }

@@ -102,8 +99,6 @@

                 levelInSkillTree++;
             }
-            var left = lessons.Except(added);
-            sortedLessons.AddRange(left.ToLessonViewModel(levelInSkillTree));
         }

         private bool RequirementsAlreadyAdded(ICollection<Lesson> requirements, HashSet<Lesson> added)


Update MessageBus.cs

Update MessageBus.cs

--- Patterns/MessageBus.cs
+++ Patterns/MessageBus.cs
@@ -3,11 +3,15 @@
 using System;
 using System.Collections;
 using UnityEngine.Assertions;
-using Object = UnityEngine.Object;
 // ReSharper disable DelegateSubtraction

 namespace Patterns.Observer
 {
+    public interface IMessageReceiver<in T>
+    {
+        void OnMessageReceived(T message);
+    }
+
     /// <summary>
     /// A message bus for implementing an Observer pattern. Call GetBus() to access the global bus,
     /// or GetBus(GameObject) to use a bus on a gameobject.
@@ -28,7 +32,7 @@

             _globalBusBehaviourInitialized = true;
             _globalBusBehaviour = new GameObject("[Global MessageBus]").AddComponent<MessageBusBehaviour>();
-            Object.DontDestroyOnLoad(_globalBusBehaviour.gameObject);
+            UnityEngine.Object.DontDestroyOnLoad(_globalBusBehaviour.gameObject);
         }

         /// <summary>
@@ -60,7 +64,7 @@
                 return new DummyBusImpl<T>();
             }

-            MessageBusBehaviour localBus = go.GetComponent<MessageBusBehaviour>() ?? go.AddComponent<MessageBusBehaviour>();
+            var localBus = go.GetComponent<MessageBusBehaviour>() ?? go.AddComponent<MessageBusBehaviour>();

             return localBus.GetBus<T>();
         }
@@ -75,7 +79,7 @@

         public IBus<T> GetBus<T>()
         {
-            Type key = typeof(T);
+            var key = typeof(T);

             object o;
             if (_busses.TryGetValue(key, out o))
@@ -110,16 +114,34 @@
         void Subscribe(Action<T> function);

         /// <summary>
+        /// Subscribe to future messages. If any buffered messages exist, recieve them instantly.
+        /// </summary>
+        /// <param name="messageReceiver"></param>
+        void Subscribe(IMessageReceiver<T> messageReceiver);
+
+        /// <summary>
         /// Subscribe to the next message only.
         /// </summary>
         /// <param name="function"></param>
         void SubscribeOnce(Action<T> function);

         /// <summary>
-        /// Release yoru subscription.
+        /// Subscribe to the next message only.
+        /// </summary>
+        /// <param name="messageReceiver"></param>
+        void SubscribeOnce(IMessageReceiver<T> messageReceiver);
+
+        /// <summary>
+        /// Release your subscription.
         /// </summary>
         /// <param name="function"></param>
         void Unsubscribe(Action<T> function);
+
+        /// <summary>
+        /// Release your subscription.
+        /// </summary>
+        /// <param name="messageReceiver"></param>
+        void Unsubscribe(IMessageReceiver<T> messageReceiver);

         /// <summary>
         /// Send a message to all subscribers.
@@ -155,8 +177,8 @@
     /// <typeparam name="T"></typeparam>
     public class DelegateBusImpl<T> : IBus<T>
     {
-        private Action<T> _actions = Empty;
-        private Action<T> _singleAction = Empty;
+        private event Action<T> _actions = Empty;
+        private event Action<T> _singleAction = Empty;
         private readonly Queue<T> _messageBuffer = new Queue<T>();
         private int _maxBufferLength = 1;

@@ -181,7 +203,7 @@

             _actions += function;

-            foreach (T buffered in _messageBuffer)
+            foreach (var buffered in _messageBuffer)
             {
                 function(buffered);
             }
@@ -258,6 +280,21 @@
         private static void Empty(T message)
         {

+        }
+
+        public void Subscribe(IMessageReceiver<T> messageReceiver)
+        {
+            Subscribe(messageReceiver.OnMessageReceived);
+        }
+
+        public void SubscribeOnce(IMessageReceiver<T> messageReceiver)
+        {
+            SubscribeOnce(messageReceiver.OnMessageReceived);
+        }
+
+        public void Unsubscribe(IMessageReceiver<T> messageReceiver)
+        {
+            Unsubscribe(messageReceiver.OnMessageReceived);
         }
     }

@@ -308,6 +345,18 @@
         {
             return 0;
         }
+
+        public void Subscribe(IMessageReceiver<T> messageReceiver)
+        {
+        }
+
+        public void SubscribeOnce(IMessageReceiver<T> messageReceiver)
+        {
+        }
+
+        public void Unsubscribe(IMessageReceiver<T> messageReceiver)
+        {
+        }
     }

     public static class MessageBusTests
@@ -330,7 +379,7 @@
             busCache.Subscribe((i) => { c[0] += i; });
             Assert.AreEqual(c[0], 2, "Send Buffered does not send to future subscribers properly.");

-            GameObject go = new GameObject("test");
+            var go = new GameObject("test");

             MessageBus.GetBus<int>(go).Send(8);
             Assert.AreEqual(c[0], 2, "Local busses leak into Global Bus.");
@@ -342,7 +391,7 @@
             Assert.AreEqual(d[0], 1, "Subscribe Once should only receive one message before Releasing itself.");

             yield return null;
-            Object.Destroy(go);
+            UnityEngine.Object.Destroy(go);
             yield return null;

             d[0] = 0;


Add thin highlight to ListView selection for 3D effect

Signed-off-by: Gabriel Burt <ce11a5f747b579a775c140646376daaba8c3eb7d@gmail.com>

--- src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
+++ src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
@@ -224,7 +224,9 @@
             bool filled, bool stroked, Cairo.Color color, CairoCorners corners)
         {
             Cairo.Color selection_color = color;
+            Cairo.Color selection_highlight = CairoExtensions.ColorShade (selection_color, 1.24);
             Cairo.Color selection_stroke = CairoExtensions.ColorShade (selection_color, 0.85);
+            selection_highlight.A = 0.5;
             selection_stroke.A = color.A;

             if (filled) {
@@ -244,7 +246,15 @@
                 cr.Fill ();
                 grad.Destroy ();
             }
-
+
+            if (filled && stroked) {
+                cr.LineWidth = 1.0;
+                cr.Color = selection_highlight;
+                CairoExtensions.RoundedRectangle (cr, x + 1.5, y + 1.5, width - 3, height - 3,
+                    Context.Radius - 1, corners, true);
+                cr.Stroke ();
+            }
+
             if (stroked) {
                 cr.LineWidth = 1.0;
                 cr.Color = selection_stroke;
@@ -261,4 +271,4 @@
             cr.Fill ();
         }
     }
-}+}


Added missing .ConfigureAwait(false).

Added missing .ConfigureAwait(false).

--- src/Magick.NET/Netstandard20/MagickImageCollection.cs
+++ src/Magick.NET/Netstandard20/MagickImageCollection.cs
@@ -173,7 +173,7 @@
         {
             using (_ = new TemporaryMagickFormat(this, format))
             {
-                await WriteAsync(stream, cancellationToken);
+                await WriteAsync(stream, cancellationToken).ConfigureAwait(false);
             }
         }
     }


Note for later, re: auth in AspNetCore

Note for later, re: auth in AspNetCore

--- src/MiniProfiler.AspNetCore/MiniProfilerExtensions.cs
+++ src/MiniProfiler.AspNetCore/MiniProfilerExtensions.cs
@@ -27,7 +27,7 @@
             if (profiler == null) return HtmlString.Empty;

             // TODO: Figure out auth
-            var authorized = true; // _options.ResultsAuthorize?.Invoke(HttpContext.Current.Request) ?? true;
+            var authorized = true; // MiniProfilerMiddleware.Current.Options.ResultsAuthorize?.Invoke(HttpContext.Current.Request) ?? true;

             // unviewed ids are added to this list during Storage.Save, but we know we haven't
             // seen the current one yet, so go ahead and add it to the end


Commented an optimization in ProjectionRepository

--- src/Elders.Cronus/Projections/ProjectionRepository.cs
+++ src/Elders.Cronus/Projections/ProjectionRepository.cs
@@ -186,7 +186,9 @@
             var elapsed = new TimeSpan((long)(TimestampToTicks * (Stopwatch.GetTimestamp() - LastRefreshTimestamp)));

             ProjectionVersions versions = inMemoryVersionStore.Get(projectionName);
-            if (elapsed.TotalMinutes > 5 || versions is null || versions.Count == 0)
+
+            //TODO: This optimization caused some problems
+            //if (elapsed.TotalMinutes > 5 || versions is null || versions.Count == 0)
             {
                 var queryResult = GetProjectionVersionsFromStore(projectionName);
                 if (queryResult.IsSuccess)


Update RelationshipEndpoints.cs

Update RelationshipEndpoints.cs

--- src/InstgramCSharp/Endpoints/RelationshipEndpoints.cs
+++ src/InstgramCSharp/Endpoints/RelationshipEndpoints.cs
@@ -78,7 +78,7 @@
         {
             using (HttpClient httpClient = new HttpClient())
             {
-                var response = await httpClient.PostAsync(RelationshipEndpointUrlsFactory.CreatePOSTRlationshipActionUrl(userId, accessToken, relationshipAction), null);
+                var response = await httpClient.PostAsync(RelationshipEndpointUrlsFactory.CreatePOSTRelationshipActionUrl(userId, accessToken, relationshipAction), null);
                 return response;
             }
         }


Fix bug preventing creation of field values

--- src/JoinRpg.Portal/Controllers/GameFieldController.cs
+++ src/JoinRpg.Portal/Controllers/GameFieldController.cs
@@ -231,7 +231,7 @@
             {
                 var field = await ProjectRepository.GetProjectField(viewModel.ProjectId, viewModel.ProjectFieldId);

-                var timeSlotOptions = viewModel.GetTimeSlotRequest(field, Request.Form["TimeSlotStartTime"][0]);
+                var timeSlotOptions = viewModel.GetTimeSlotRequest(field, Request.Form["TimeSlotStartTime"].FirstOrDefault());

                 await
                     FieldSetupService.CreateFieldValueVariant(
@@ -248,8 +248,9 @@

                 return RedirectToAction("Edit", new { viewModel.ProjectId, projectFieldId = viewModel.ProjectFieldId });
             }
-            catch
-            {
+            catch (Exception ex)
+            {
+                ModelState.AddException(ex);
                 return View(viewModel);
             }
         }


Complete issue #155

Complete issue #155

- No bug fix for .NET as .NET doesn’t have the same bug.
- Enhance ReplicationTest.TestPusher.

--- src/Couchbase.Lite.Tests.Shared/ReplicationTest.cs
+++ src/Couchbase.Lite.Tests.Shared/ReplicationTest.cs
@@ -217,95 +217,17 @@
             Assert.IsTrue(success);
         }

-        private Boolean IsSyncGateway(Uri remote) {
+        private Boolean IsSyncGateway(Uri remote)
+        {
             return (remote.Port == 4984 || remote.Port == 4985);
         }

-        [SetUp]
-        public void Setup()
-        {
-            Log.V(Tag, "------");
-        }
-
-        /// <exception cref="System.Exception"></exception>
-        [Test]
-        public void TestPusher()
-        {
-            var remote = GetReplicationURL();
-            var docIdTimestamp = Convert.ToString(Runtime.CurrentTimeMillis());
-
-            // Create some documents:
-            var documentProperties = new Dictionary<string, object>();
-            var doc1Id = string.Format("doc1-{0}", docIdTimestamp);
-            documentProperties["_id"] = doc1Id;
-            documentProperties["foo"] = 1;
-            documentProperties["bar"] = false;
-
-            var body = new Body(documentProperties);
-            var rev1 = new RevisionInternal(body, database);
-            var status = new Status();
-            rev1 = database.PutRevision(rev1, null, false, status);
-            Assert.AreEqual(StatusCode.Created, status.GetCode());
-
-            documentProperties.Put("_rev", rev1.GetRevId());
-            documentProperties["UPDATED"] = true;
-            database.PutRevision(new RevisionInternal(documentProperties, database), rev1.GetRevId(), false, status);
-            Assert.AreEqual(StatusCode.Created, status.GetCode());
-
-            documentProperties = new Dictionary<string, object>();
-            var doc2Id = string.Format("doc2-{0}", docIdTimestamp);
-            documentProperties["_id"] = doc2Id;
-            documentProperties["baz"] = 666;
-            documentProperties["fnord"] = true;
-
-            database.PutRevision(new RevisionInternal(documentProperties, database), null, false, status);
-            Assert.AreEqual(StatusCode.Created, status.GetCode());
-
-            var doc2 = database.GetDocument(doc2Id);
-            var doc2UnsavedRev = doc2.CreateRevision();
-            var attachmentStream = GetAsset("attachment.png");
-            doc2UnsavedRev.SetAttachment("attachment.png", "image/png", attachmentStream);
-            var doc2Rev = doc2UnsavedRev.Save();
-
-            Assert.IsNotNull(doc2Rev);
-
-            const bool continuous = false;
-            var repl = database.CreatePushReplication(remote);
-            repl.Continuous = continuous;
-            if (!IsSyncGateway(remote)) {
-                repl.CreateTarget = true;
-            }
-
-            // Check the replication's properties:
-            Assert.AreEqual(database, repl.LocalDatabase);
-            Assert.AreEqual(remote, repl.RemoteUrl);
-            Assert.IsFalse(repl.IsPull);
-            Assert.IsFalse(repl.Continuous);
-            Assert.IsNull(repl.Filter);
-            Assert.IsNull(repl.FilterParams);
-            // TODO: CAssertNil(r1.doc_ids);
-            // TODO: CAssertNil(r1.headers);
-
-            // Check that the replication hasn't started running:
-            Assert.IsFalse(repl.IsRunning);
-            Assert.AreEqual((int)repl.Status, (int)ReplicationStatus.Stopped);
-            Assert.AreEqual(0, repl.CompletedChangesCount);
-            Assert.AreEqual(0, repl.ChangesCount);
-            Assert.IsNull(repl.LastError);
-
-            RunReplication(repl);
-
-            // TODO: Verify the foloowing 2 asserts. ChangesCount and CompletedChangesCount
-            // should already be reset when the replicator stopped.
-            // Assert.IsTrue(repl.ChangesCount >= 2);
-            // Assert.IsTrue(repl.CompletedChangesCount >= 2);
-            Assert.IsNull(repl.LastError);
-
-            // make sure doc1 is there
-            // TODO: make sure doc2 is there (refactoring needed)
+        private void VerifyRemoteDocExists(Uri remote, string docId)
+        {
             var replicationUrlTrailing = new Uri(string.Format("{0}/", remote));
-            var pathToDoc = new Uri(replicationUrlTrailing, doc1Id);
+            var pathToDoc = new Uri(replicationUrlTrailing, docId);
             Log.D(Tag, "Send http request to " + pathToDoc);
+
             var httpRequestDoneSignal = new CountDownLatch(1);
             Task.Factory.StartNew(() =>
             {
@@ -324,7 +246,7 @@
                         var responseStringTask = response.Content.ReadAsStringAsync();
                         responseStringTask.Wait(TimeSpan.FromSeconds(10));
                         responseString = responseStringTask.Result;
-                        Assert.IsTrue(responseString.Contains(doc1Id));
+                        Assert.IsTrue(responseString.Contains(docId));
                         Log.D(ReplicationTest.Tag, "result: " + responseString);
                     }
                     else
@@ -342,21 +264,135 @@
                 {
                     Assert.IsNull(e, "Got IOException: " + e.Message);
                 }
+
                 httpRequestDoneSignal.CountDown();
             });

-            //Closes the connection.
-            Log.D(Tag, "Waiting for http request to finish");
-            try
-            {
-                var result = httpRequestDoneSignal.Await(TimeSpan.FromSeconds(10));
-                Assert.IsTrue(result, "Could not retrieve the new doc from the sync gateway.");
-                Log.D(Tag, "http request finished");
-            }
-            catch (Exception e)
-            {
-                Sharpen.Runtime.PrintStackTrace(e);
-            }
+            var result = httpRequestDoneSignal.Await(TimeSpan.FromSeconds(10));
+            Assert.IsTrue(result, "Could not retrieve the new doc from the sync gateway.");
+        }
+
+        private IDictionary<string, object> GetRemoteDoc(Uri remote, string checkpointId)
+        {
+            var url = new Uri(string.Format("{0}/_local/{1}", remote, checkpointId));
+            var request = new HttpRequestMessage(HttpMethod.Get, url);
+            var response = new HttpClient().SendAsync(request).Result;
+            var result = response.Content.ReadAsStringAsync().Result;
+            var json = Manager.GetObjectMapper().ReadValue<JObject>(result);
+            return json.AsDictionary<string, object>();
+        }
+
+        [SetUp]
+        public void Setup()
+        {
+            Log.V(Tag, "------");
+        }
+
+        /// <exception cref="System.Exception"></exception>
+        [Test]
+        public void TestPusher()
+        {
+            var remote = GetReplicationURL();
+            var docIdTimestamp = Convert.ToString(Runtime.CurrentTimeMillis());
+
+            // Create some documents:
+            var documentProperties = new Dictionary<string, object>();
+            var doc1Id = string.Format("doc1-{0}", docIdTimestamp);
+            documentProperties["_id"] = doc1Id;
+            documentProperties["foo"] = 1;
+            documentProperties["bar"] = false;
+
+            var body = new Body(documentProperties);
+            var rev1 = new RevisionInternal(body, database);
+            var status = new Status();
+            rev1 = database.PutRevision(rev1, null, false, status);
+            Assert.AreEqual(StatusCode.Created, status.GetCode());
+
+            documentProperties.Put("_rev", rev1.GetRevId());
+            documentProperties["UPDATED"] = true;
+            database.PutRevision(new RevisionInternal(documentProperties, database), rev1.GetRevId(), false, status);
+            Assert.AreEqual(StatusCode.Created, status.GetCode());
+
+            documentProperties = new Dictionary<string, object>();
+            var doc2Id = string.Format("doc2-{0}", docIdTimestamp);
+            documentProperties["_id"] = doc2Id;
+            documentProperties["baz"] = 666;
+            documentProperties["fnord"] = true;
+
+            database.PutRevision(new RevisionInternal(documentProperties, database), null, false, status);
+            Assert.AreEqual(StatusCode.Created, status.GetCode());
+
+            var doc2 = database.GetDocument(doc2Id);
+            var doc2UnsavedRev = doc2.CreateRevision();
+            var attachmentStream = GetAsset("attachment.png");
+            doc2UnsavedRev.SetAttachment("attachment.png", "image/png", attachmentStream);
+            var doc2Rev = doc2UnsavedRev.Save();
+
+            Assert.IsNotNull(doc2Rev);
+
+            const bool continuous = false;
+            var repl = database.CreatePushReplication(remote);
+            repl.Continuous = continuous;
+            if (!IsSyncGateway(remote)) {
+                repl.CreateTarget = true;
+            }
+
+            // Check the replication's properties:
+            Assert.AreEqual(database, repl.LocalDatabase);
+            Assert.AreEqual(remote, repl.RemoteUrl);
+            Assert.IsFalse(repl.IsPull);
+            Assert.IsFalse(repl.Continuous);
+            Assert.IsNull(repl.Filter);
+            Assert.IsNull(repl.FilterParams);
+            // TODO: CAssertNil(r1.doc_ids);
+            // TODO: CAssertNil(r1.headers);
+
+            // Check that the replication hasn't started running:
+            Assert.IsFalse(repl.IsRunning);
+            Assert.AreEqual((int)repl.Status, (int)ReplicationStatus.Stopped);
+            Assert.AreEqual(0, repl.CompletedChangesCount);
+            Assert.AreEqual(0, repl.ChangesCount);
+            Assert.IsNull(repl.LastError);
+
+            RunReplication(repl);
+
+            // TODO: Verify the foloowing 2 asserts. ChangesCount and CompletedChangesCount
+            // should already be reset when the replicator stopped.
+            // Assert.IsTrue(repl.ChangesCount >= 2);
+            // Assert.IsTrue(repl.CompletedChangesCount >= 2);
+            Assert.IsNull(repl.LastError);
+
+            VerifyRemoteDocExists(remote, doc1Id);
+
+            // Add doc3
+            documentProperties = new Dictionary<string, object>();
+            var doc3Id = string.Format("doc3-{0}", docIdTimestamp);
+            var doc3 = database.GetDocument(doc3Id);
+            documentProperties["bat"] = 677;
+            doc3.PutProperties(documentProperties);
+
+            // re-run push replication
+            var repl2 = database.CreatePushReplication(remote);
+            repl2.Continuous = continuous;
+            if (!IsSyncGateway(remote))
+            {
+                repl2.CreateTarget = true;
+            }
+
+            var repl2CheckedpointId = repl2.RemoteCheckpointDocID();
+
+            RunReplication(repl2);
+
+            // make sure trhe doc has been added
+            VerifyRemoteDocExists(remote, doc3Id);
+
+            Assert.AreEqual(repl2.LastSequence, database.LastSequenceWithCheckpointId(repl2CheckedpointId));
+
+            System.Threading.Thread.Sleep(2000);
+            var json = GetRemoteDoc(remote, repl2CheckedpointId);
+            var remoteLastSequence = (string)json["lastSequence"];
+            Assert.AreEqual(repl2.LastSequence, remoteLastSequence);
+
             Log.D(Tag, "testPusher() finished");
         }


Fix for TestIndexableField.TestArbitraryFields - In java, the byte class is signed and in C# it is unsigned. Changed the unit test to cast to a (byte) insetad of an (sbyte).

An alternate much deeper fix would be to change the Lucene.Net.Util.BytesRef class to use sbyte insetad of byte. Not sure if this class was intentionally setup this way or if it is a conversion error. Comments please.

--- src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
+++ src/Lucene.Net.Tests/core/Index/TestIndexableField.cs
@@ -307,7 +307,7 @@
                             Assert.AreEqual(10, b.Length);
                             for (int idx = 0; idx < 10; idx++)
                             {
-                                Assert.AreEqual((sbyte)(idx + counter), b.Bytes[b.Offset + idx]);
+                                Assert.AreEqual((byte)(idx + counter), b.Bytes[b.Offset + idx]);
                             }
                         }
                         else


Fixing issue causes by struct

Fixing issue causes by struct

--- src/MahApps.Metro/Controls/ColorPicker/ColorHelper.cs
+++ src/MahApps.Metro/Controls/ColorPicker/ColorHelper.cs
@@ -70,7 +70,11 @@

                 if (!colorName!.StartsWith("#"))
                 {
-                    result = colorNamesDictionary?.FirstOrDefault(x => string.Equals(x.Value, colorName, StringComparison.OrdinalIgnoreCase)).Key;
+                    // We need to check with any first as the key is of type Color, which is a struct.
+                    if (colorNamesDictionary?.Any(x => string.Equals(x.Value, colorName, StringComparison.OrdinalIgnoreCase)) == true)
+                    {
+                        result = colorNamesDictionary.FirstOrDefault(x => string.Equals(x.Value, colorName, StringComparison.OrdinalIgnoreCase)).Key;
+                    }
                 }

                 result ??= ColorConverter.ConvertFromString(colorName) as Color?;


Fix null ref in PEFile

Fix null ref in PEFile

Fix a null ref in minidumps where the header is discarded and we end up
dereferencing a null value.

--- src/Microsoft.Diagnostics.Runtime/Utilities/pefile.cs
+++ src/Microsoft.Diagnostics.Runtime/Utilities/pefile.cs
@@ -72,7 +72,7 @@
             _stream = stream;
             _headerBuff = buffer;
             Header = header;
-            if (Header.PEHeaderSize > _headerBuff.Length)
+            if (header != null && header.PEHeaderSize > _headerBuff.Length)
                 throw new InvalidOperationException("Bad PE Header in " + filePath);
         }
         /// <summary>


Fix another dev error.

Fix another dev error.

--- src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
+++ src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
@@ -170,7 +170,7 @@
             You can edit
             the package and submit the edit again to retry the edit.

-    }
+    }
     @if (Model.Prerelease)
     {


Removed unused field.

Removed unused field.

--- Perspex.Application/Application.cs
+++ Perspex.Application/Application.cs
@@ -41,8 +41,6 @@
         /// The styler that will be used to apply styles to controls.
         /// </summary>
         private Styler styler = new Styler();
-
-        private ICloseable mainWindow;

         /// <summary>
         /// Initializes a new instance of the <see cref="Application"/> class.


Fix context menus rendering out of bounds of container

--- osu.Framework/Graphics/Cursor/ContextMenuContainer.cs
+++ osu.Framework/Graphics/Cursor/ContextMenuContainer.cs
@@ -1,6 +1,7 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

+using System;
 using System.Linq;
 using osuTK;
 using osuTK.Input;
@@ -77,7 +78,9 @@
                     menu.Items = menuTarget.ContextMenuItems;

                     menu.Position = ToLocalSpace(e.ScreenSpaceMousePosition);
-                    relativeCursorPosition = ToSpaceOfOtherDrawable(menu.Position, menuTarget);
+
+                    updateRelativePosition();
+
                     menu.Open();
                     return true;

@@ -90,8 +93,26 @@
         protected override void UpdateAfterChildren()
         {
             base.UpdateAfterChildren();
-            if (menu.State == MenuState.Open && menuTarget != null)
-                menu.Position = menuTarget.ToSpaceOfOtherDrawable(relativeCursorPosition, this);
+
+            if (menu.State != MenuState.Open || menuTarget == null) return;
+
+            ensureWithinBounds();
+            menu.Position = menuTarget.ToSpaceOfOtherDrawable(relativeCursorPosition, this);
         }
+
+        private void ensureWithinBounds()
+        {
+            Vector2 overflow = menu.Position + menu.DrawSize - DrawSize;
+
+            if (overflow.X > 0 || overflow.Y > 0)
+            {
+                menu.X -= Math.Max(0, overflow.X);
+                menu.Y -= Math.Max(0, overflow.Y);
+
+                updateRelativePosition();
+            }
+        }
+
+        private void updateRelativePosition() => relativeCursorPosition = ToSpaceOfOtherDrawable(menu.Position, menuTarget);
     }
 }


include newlines on file writes

include newlines on file writes

--- Pocket.Logger/For.Xunit/TestLog.cs
+++ Pocket.Logger/For.Xunit/TestLog.cs
@@ -56,7 +56,7 @@
                 {
                     try
                     {
-                        File.AppendAllText(LogFile.FullName, e.ToLogString());
+                        File.AppendAllText(LogFile.FullName, e.ToLogString() + Environment.NewLine);
                     }
                     catch (Exception)
                     {


Fix Debug.Assert containing essential code

--- osu.Framework/Platform/SDL2DesktopWindow_Windowing.cs
+++ osu.Framework/Platform/SDL2DesktopWindow_Windowing.cs
@@ -9,6 +9,7 @@
 using System.Linq;
 using osu.Framework.Bindables;
 using osu.Framework.Configuration;
+using osu.Framework.Extensions.ObjectExtensions;
 using osu.Framework.Logging;
 using osu.Framework.Platform.SDL2;
 using osuTK;
@@ -313,8 +314,9 @@
         {
             return Enumerable.Range(0, SDL.SDL_GetNumVideoDisplays()).Select(i =>
             {
-                Debug.Assert(tryGetDisplayFromSDL(i, out var display));
-                return display;
+                bool success = tryGetDisplayFromSDL(i, out var display);
+                Debug.Assert(success);
+                return display.AsNonNull();
             }).ToArray();
         }


Avoid throwing unobserved exception when `PerformancePointsCounter` requests timed attributes

--- osu.Game/Screens/Play/HUD/PerformancePointsCounter.cs
+++ osu.Game/Screens/Play/HUD/PerformancePointsCounter.cs
@@ -6,7 +6,6 @@
 using System.IO;
 using System.Linq;
 using System.Threading;
-using System.Threading.Tasks;
 using JetBrains.Annotations;
 using osu.Framework.Allocation;
 using osu.Framework.Audio.Track;
@@ -80,13 +79,16 @@
                 difficultyCache.GetTimedDifficultyAttributesAsync(gameplayWorkingBeatmap, gameplayState.Ruleset, clonedMods, loadCancellationSource.Token)
                                .ContinueWith(task => Schedule(() =>
                                {
+                                   if (task.Exception != null)
+                                       return;
+
                                    timedAttributes = task.GetResultSafely();

                                    IsValid = true;

                                    if (lastJudgement != null)
                                        onJudgementChanged(lastJudgement);
-                               }), TaskContinuationOptions.OnlyOnRanToCompletion);
+                               }));
             }
         }


Revert "Merge branch 'master' into powerplant-auction"

This reverts commit ba2eb93e417c4a79b68740d95e8d58b830faca2b, reversing
changes made to 515caf44d000b5400f2344984429725f048706be.

--- PowerGrid/Assets/Scripts/Player.cs
+++ PowerGrid/Assets/Scripts/Player.cs
@@ -116,7 +116,7 @@
 	}

 	public void CommitPurchases() {
-//		print ("commiting purchases");
+		print ("commiting purchases");
 		foreach (CityPurchase cp in cityPurchases)
 			cp.Commit ();
 	}


fix string serialization

fix string serialization

--- src/OpenTl.Schema/Serialization/SerializationUtils.cs
+++ src/OpenTl.Schema/Serialization/SerializationUtils.cs
@@ -1,11 +1,14 @@
 namespace OpenTl.Schema.Serialization
 {
     using System;
+    using System.Diagnostics;
     using System.Linq;
     using System.Text;

     public class SerializationUtils
     {
+        private static readonly Encoding LatinEncoding = Encoding.GetEncoding("Latin1");
+
         public static byte[] GetBytes(string str)
         {
             return Encoding.UTF8.GetBytes(str);
@@ -15,17 +18,32 @@
         {
             return Encoding.UTF8.GetString(bytes);
         }
-
+
         public static byte[] GetBinaryFromString(string str)
         {
-            return str.Select(Convert.ToByte).ToArray();
+            var bytes = LatinEncoding.GetBytes(str);
+
+            var decodedString = LatinEncoding.GetString(bytes);
+
+            Debug.Assert(str == decodedString);
+
+            return bytes;
         }
-
+
         public static string GetStringFromBinary(byte[] bytes)
         {
-            var chars = bytes.Select(Convert.ToChar).ToArray();
-
-            return new string(chars);
+            var str = LatinEncoding.GetString(bytes);
+
+            var decodedBytes = LatinEncoding.GetBytes(str);
+
+            Debug.Assert(bytes.Length == decodedBytes.Length);
+
+            for (var i = 0; i < bytes.Length; i++)
+            {
+                Debug.Assert(bytes[i] == decodedBytes[i]);
+            }
+
+            return str;
         }
     }
 }


Re-enabled scroll bars.

Re-enabled scroll bars.

--- src/Gallio/Gallio.UI/TestStepRunViewer.Designer.cs
+++ src/Gallio/Gallio.UI/TestStepRunViewer.Designer.cs
@@ -37,7 +37,6 @@
             this.webBrowser.Location = new System.Drawing.Point(0, 0);
             this.webBrowser.Name = "webBrowser";
             this.webBrowser.ScriptErrorsSuppressed = true;
-            this.webBrowser.ScrollBarsEnabled = false;
             this.webBrowser.Size = new System.Drawing.Size(400, 200);
             this.webBrowser.TabIndex = 0;
             this.webBrowser.Url = new System.Uri("about:blank", System.UriKind.Absolute);


PP9-9551: Test is testing timing related things, this cannot work always, remove random failing test

--- src/Picturepark.SDK.V1.Tests/Clients/TransferTests.cs
+++ src/Picturepark.SDK.V1.Tests/Clients/TransferTests.cs
@@ -434,23 +434,6 @@
             var contentIds = result.Select(r => r.ContentId);

             Assert.Equal(importFilePaths.Count(), contentIds.Count());
-        }
-
-        [Fact]
-        [Trait("Stack", "Transfers")]
-        public async Task ShouldRespectTimeoutWhileUploading()
-        {
-            var transferName = Guid.NewGuid().ToString();
-
-            var ex = await Assert.ThrowsAnyAsync<Exception>(
-                async () =>
-                    await _client.Transfer.UploadFilesAsync(
-                        transferName,
-                        new[] { new FileLocations($"{Guid.NewGuid():N}"), },
-                        new UploadOptions { WaitForTransferCompletion = true },
-                        TimeSpan.FromMilliseconds(1)).ConfigureAwait(false)).ConfigureAwait(false);
-
-            Assert.Contains(ex.GetType(), new[] { typeof(BusinessProcessLifeCycleNotHitException), typeof(BusinessProcessStateNotHitException) });
         }

         [Fact]


PP9-8602 update tests and add test for compatibility

--- src/Picturepark.SDK.V1.Tests/Clients/TransferTests.cs
+++ src/Picturepark.SDK.V1.Tests/Clients/TransferTests.cs
@@ -121,7 +121,7 @@
                 WebLinks = urls.Select(url => new TransferWebLink
                 {
                     Url = url,
-                    Identifier = Guid.NewGuid().ToString()
+                    RequestId = Guid.NewGuid().ToString()
                 }).ToList()
             };

@@ -129,6 +129,45 @@

             // Assert
             Assert.NotNull(result.Transfer);
+        }
+
+        [Fact]
+        [Trait("Stack", "Transfers")]
+        public async Task ShouldSupportRequestIdAndLegacyIdentifier()
+        {
+            // Arrange
+            var transferName = "UrlImportRequestIdAndLegacyIdentifier " + new Random().Next(1000, 9999);
+            var urlsAndIds = new List<(string url, string id, bool legacy)>
+            {
+                ("https://picturepark.com/wp-content/uploads/2013/06/home-marquee.jpg", "marquee", true),
+                ("http://cdn1.spiegel.de/images/image-733178-900_breitwand_180x67-zgpe-733178.jpg", "breitwand", false)
+            };
+
+            // Act
+            var request = new CreateTransferRequest
+            {
+                Name = transferName,
+                TransferType = TransferType.WebDownload,
+                WebLinks = urlsAndIds.Select(urlAndId =>
+                {
+                    var webLink = new TransferWebLink() { Url = urlAndId.url };
+
+                    if (urlAndId.legacy)
+                        webLink.Identifier = urlAndId.id;
+                    else
+                        webLink.RequestId = urlAndId.id;
+
+                    return webLink;
+                }).ToList()
+            };
+
+            var createdTransfer = await _client.Transfer.CreateAsync(request).ConfigureAwait(false);
+            var fileTransfers = await _client.Transfer.SearchFilesByTransferIdAsync(createdTransfer.Id).ConfigureAwait(false);
+
+            // Assert
+            fileTransfers.Results.Should().HaveCount(2);
+            fileTransfers.Results.Should().OnlyContain(fileTransfer => urlsAndIds.Any(urlAndId =>
+                fileTransfer.RequestId == fileTransfer.Identifier && fileTransfer.RequestId == urlAndId.id));
         }

         [Fact]
@@ -487,7 +526,7 @@
                 WebLinks = urls.Select(url => new TransferWebLink
                 {
                     Url = url,
-                    Identifier = Guid.NewGuid().ToString()
+                    RequestId = Guid.NewGuid().ToString()
                 }).ToList()
             };


Type - Interface Fix

Type - Interface Fix

--- Randomizer/RandomizerExtensions.cs
+++ Randomizer/RandomizerExtensions.cs
@@ -2,7 +2,7 @@
 {
     public static class Randomizer
     {
-        public static Randomizer<TItem> ToRandomized<TItem>(this IEnumerable<TItem> items)
+        public static IEnumerable<TItem> ToRandomized<TItem>(this IEnumerable<TItem> items)
         {
             return new Randomizer<TItem>(items);
         }


Add a simplifying constructor to ModalRenderEngine.

--- RenderEngines/ModalRenderEngine.cs
+++ RenderEngines/ModalRenderEngine.cs
@@ -28,6 +28,7 @@
 {
 	public class ModalRenderEngine : RenderEngine
 	{
+		public ModalRenderEngine(RhinoDoc doc, Guid pluginId) : this(doc, pluginId, null, null, null) { }
 		public ModalRenderEngine(RhinoDoc doc, Guid pluginId, ViewInfo view, ViewportInfo viewport, Rhino.Display.DisplayPipelineAttributes attributes)
 			: base(pluginId, doc.RuntimeSerialNumber, view, viewport, attributes, false)
 		{
@@ -102,6 +103,7 @@
 				DisplayBufferLinear = true,
 				ProgressiveRefine = true,
 				Progressive = true,
+				PixelSize = 1,
 			};
 			#endregion


SqlServerTableBuilder: COLLATE databae_default for nvarchar columns

--- src/Kirkin/Data/SqlClient/SqlServerTableBuilder.cs
+++ src/Kirkin/Data/SqlClient/SqlServerTableBuilder.cs
@@ -82,7 +82,7 @@
             string nullOrNotNull = column.AllowDBNull ? "NULL" : "NOT NULL";

             if (column.DataType == typeof(string)) {
-                return $"nvarchar({ComputeVarcharColumnLength(column)}) {nullOrNotNull}";
+                return $"nvarchar({ComputeVarcharColumnLength(column)}) COLLATE database_default {nullOrNotNull}";
             }

             if (ClrSqlTypeMappings.TryGetValue(column.DataType, out string sqlType)) {


Fixes issue where LiteralInlineParser calls PostMatch while processor.Inline is type other than LiteralInline

--- src/Markdig/Parsers/Inlines/LiteralInlineParser.cs
+++ src/Markdig/Parsers/Inlines/LiteralInlineParser.cs
@@ -92,9 +92,9 @@
             slice.Start = nextStart;

             // Call only PostMatch if necessary
-            if (PostMatch != null)
+            if (processor.Inline is LiteralInline)
             {
-                PostMatch(processor, ref slice);
+                PostMatch?.Invoke(processor, ref slice);
             }

             return true;


minor version bump

minor version bump

--- Rollbar/Properties/AssemblyInfo.cs
+++ Rollbar/Properties/AssemblyInfo.cs
@@ -14,5 +14,5 @@
 [assembly: Guid("034b2c39-d11f-4285-9e1a-f423c01133cc")]
 #endregion

-[assembly: AssemblyVersion("0.1.0.0")]
-[assembly: AssemblyFileVersion("0.1.0.0")]
+[assembly: AssemblyVersion("0.2.0.0")]
+[assembly: AssemblyFileVersion("0.2.0.0")]


Try to make it work

Try to make it work

--- src/hihapi/Controllers/Finance/FinanceAccountsController.cs
+++ src/hihapi/Controllers/Finance/FinanceAccountsController.cs
@@ -43,14 +43,14 @@
             }

             // Check whether User assigned with specified Home ID
-            var query = from hmem in _context.HomeMembers where hmem.User == usrName
+            var query = (from hmem in _context.HomeMembers where hmem.User == usrName
                         select new { hmem.HomeID, hmem.User, hmem.IsChild } into hmems
                         join acnts in _context.FinanceAccount
                           on hmems.HomeID equals acnts.HomeID
                         where ( hmems.IsChild == true && hmems.User == acnts.Owner )
                             || !hmems.IsChild.HasValue
                             || hmems.IsChild == false
-                        select acnts;
+                        select acnts).AsQueryable();

 #if DEBUG
             // For testing purpose


Supporess finalization when UnmanagedBlob allocation failed

--- src/Shared/PlatformSupport/StandardRuntimePlatform.cs
+++ src/Shared/PlatformSupport/StandardRuntimePlatform.cs
@@ -49,12 +49,20 @@

             public UnmanagedBlob(StandardRuntimePlatform plat, int size)
             {
-                if (size <= 0)
-                    throw new ArgumentException("Positive number required", nameof(size));
-                _plat = plat;
-                _address = plat.Alloc(size);
-                GC.AddMemoryPressure(size);
-                Size = size;
+                try
+                {
+                    if (size <= 0)
+                        throw new ArgumentException("Positive number required", nameof(size));
+                    _plat = plat;
+                    _address = plat.Alloc(size);
+                    GC.AddMemoryPressure(size);
+                    Size = size;
+                }
+                catch
+                {
+                    GC.SuppressFinalize();
+                    throw;
+                }
 #if DEBUG
                 _backtrace = Environment.StackTrace;
                 lock (_btlock)