Немного о погоде: тест на корректное получение температуры по ID города от выбранного заранее агрегатора

--- tdd/tddTest/UnitTest1.cs
+++ tdd/tddTest/UnitTest1.cs
@@ -27,5 +27,13 @@
             Companion companion = new Companion();
             Assert.AreEqual(">>> Пока!", companion.getWords("Пока"));
         }
+
+        [TestMethod]
+        public void WeatherMakerTest()
+        {
+            WeatherMaker wm = new WeatherMaker();
+            int temperature = wm.getCurTemperatureByCityID(1510853);
+            Assert.IsTrue(temperature > -40 && temperature < 40 ? true : false);
+        }
     }
 }


Have to destroy the window object...

Have to destroy the window object...

--- contractScenario.cs
+++ contractScenario.cs
@@ -63,6 +63,7 @@
 			private set { }
 		}

+		//Make the first load smoother
 		[KSPField(isPersistant = true)]
 		public bool loaded = false;

@@ -83,6 +84,7 @@

 		internal contractsWindow cWin;

+		//Convert all of our saved strings into the appropriate arrays for each game scene
 		public override void OnLoad(ConfigNode node)
 		{
 			showList.Clear();
@@ -104,11 +106,13 @@
 				loadWindow(winPos);
 				loaded = true;
 			}
+			//Start the window object
 			cWin = gameObject.AddComponent<contractsWindow>();
 		}

 		public override void OnSave(ConfigNode node)
 		{
+			//Convert the contract lists into Guid for storage
 			Guid[] showListID = contractID(showList);
 			Guid[] hiddenListID = contractID(hiddenList);
 			saveWindow(windowRects[currentScene(HighLogic.LoadedScene)]);
@@ -127,6 +131,13 @@
 			node.AddNode(scenes);
 		}

+		//Remove our contract window object
+		private void OnDestroy()
+		{
+			Destroy(cWin);
+			print("[CW] Destroying Contract Window");
+		}
+
 		#region utilities

 		internal static int currentScene(GameScenes s)
@@ -146,6 +157,7 @@
 			}
 		}

+		//Convert array types into strings for storage
 		private string stringConcat(int[] source, int i)
 		{
 			if (i == 0)
@@ -182,6 +194,7 @@
 			return string.Concat(s).TrimEnd(',');
 		}

+		//Convert strings into the appropriate arrays
 		private int[] stringSplit(string source)
 		{
 			string[] s = source.Split(',');
@@ -225,6 +238,7 @@
 			return id;
 		}

+		//Populate the contract lists based on contract Guid values
 		internal void addToList(Guid ID, List<contractContainer> cL)
 		{
 			Contract c = ContractSystem.Instance.Contracts.FirstOrDefault(n => n.ContractGuid == ID);
@@ -236,6 +250,7 @@

 		#region save/load methods

+		//Save and load the window rectangle position
 		private void saveWindow(Rect source)
 		{
 			int i = currentScene(HighLogic.LoadedScene);


Autoformat

Autoformat

--- ExpressionToCodeTest/EnumerableFormattingTest.cs
+++ ExpressionToCodeTest/EnumerableFormattingTest.cs
@@ -3,61 +3,51 @@
 using ExpressionToCodeLib;
 using Xunit;

-namespace ExpressionToCodeTest
-{
-    public class EnumerableFormattingTest
-    {
+namespace ExpressionToCodeTest {
+    public class EnumerableFormattingTest {
         [Fact]
-        public void ShortArraysRenderedCompletely()
-        {
+        public void ShortArraysRenderedCompletely() {
             Assert.Equal("new[] {1, 2, 3}", ObjectToCode.ComplexObjectToPseudoCode(new[] { 1, 2, 3 }));
         }

         [Fact]
-        public void ShortEnumerablesRenderedCompletely()
-        {
+        public void ShortEnumerablesRenderedCompletely() {
             Assert.Equal("{1, 2, 3}", ObjectToCode.ComplexObjectToPseudoCode(Enumerable.Range(1, 3)));
         }

         [Fact]
-        public void LongEnumerablesBreakAfter10_InCodeGen()
-        {
+        public void LongEnumerablesBreakAfter10_InCodeGen() {
             Assert.Equal(
                 "{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}",
                 ExpressionToCodeConfiguration.DefaultCodeGenConfiguration.ComplexObjectToPseudoCode(Enumerable.Range(1, 18)));
         }

         [Fact]
-        public void LongArraysBreakAfter15_InAssertions()
-        {
+        public void LongArraysBreakAfter15_InAssertions() {
             Assert.Equal(
                 "new[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ...}",
                 ExpressionToCodeConfiguration.DefaultAssertionConfiguration.ComplexObjectToPseudoCode(Enumerable.Range(1, 18).ToArray()));
         }

         [Fact]
-        public void LongArraysDoNotBreakAfter15_InCodeGen()
-        {
+        public void LongArraysDoNotBreakAfter15_InCodeGen() {
             Assert.Equal("new[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}", ObjectToCode.ComplexObjectToPseudoCode(Enumerable.Range(1, 18).ToArray()));
         }

         [Fact]
-        public void LongArraysDoNotBreakIfSoConfigured()
-        {
+        public void LongArraysDoNotBreakIfSoConfigured() {
             var config = ExpressionToCodeConfiguration.DefaultCodeGenConfiguration.WithPrintedListLengthLimit(null);
             Assert.Equal("new[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}", config.ComplexObjectToPseudoCode(Enumerable.Range(1, 13).ToArray()));
         }

         [Fact]
-        public void EnumerableElisionIsConfigurable()
-        {
+        public void EnumerableElisionIsConfigurable() {
             var config = ExpressionToCodeConfiguration.DefaultCodeGenConfiguration.WithPrintedListLengthLimit(3);
             Assert.Equal("{1, 2, 3, ...}", config.ComplexObjectToPseudoCode(Enumerable.Range(1, 13)));
         }

         [Fact]
-        public void InsertsLineBreaksWhenNecessary()
-        {
+        public void InsertsLineBreaksWhenNecessary() {
             Assert.Equal(
                 @"{
     ""12345000"",
@@ -77,8 +67,7 @@
         }

         [Fact]
-        public void InsertsLineBreaksContentsContainLineBreaks()
-        {
+        public void InsertsLineBreaksContentsContainLineBreaks() {
             Assert.Equal(
                 @"{
     new {
@@ -94,8 +83,7 @@
         }

         [Fact]
-        public void NestedArraysUseProperConfig()
-        {
+        public void NestedArraysUseProperConfig() {
             var config = ExpressionToCodeConfiguration.DefaultCodeGenConfiguration.WithPrintedListLengthLimit(3);
             ApprovalTest.Verify(config.ComplexObjectToPseudoCode(new[] {
                 null,


Add basic integration test skeleton

Add basic integration test skeleton

--- projects/LockSample/source/LockSample.App/Program.cs
+++ projects/LockSample/source/LockSample.App/Program.cs
@@ -7,11 +7,68 @@
 namespace LockSample
 {
     using System;
+    using System.Collections.Generic;
+    using System.Globalization;
+    using System.Threading;
+    using System.Threading.Tasks;

     internal sealed class Program
     {
         private static void Main(string[] args)
         {
+            Random random = new Random();
+            ExclusiveLock l = new ExclusiveLock();
+            List<int> list = new List<int>();
+
+            using (CancellationTokenSource cts = new CancellationTokenSource())
+            {
+                Task task = LoopAsync(random, l, list, cts.Token);
+
+                Thread.Sleep(1000);
+
+                cts.Cancel();
+                task.Wait();
+            }
+        }
+
+        private static async Task LoopAsync(Random random, ExclusiveLock l, IList<int> list, CancellationToken token)
+        {
+            while (!token.IsCancellationRequested)
+            {
+                switch (random.Next(1))
+                {
+                    case 0:
+                        await EnumerateListAsync(l, list);
+                        break;
+                }
+            }
+        }
+
+        private static async Task EnumerateListAsync(ExclusiveLock l, IList<int> list)
+        {
+            ExclusiveLock.Token token = await l.AcquireAsync();
+            await Task.Yield();
+            try
+            {
+                int lastItem = 0;
+                foreach (int item in list)
+                {
+                    if (lastItem != (item - 1))
+                    {
+                        throw new InvalidOperationException(string.Format(
+                            CultureInfo.InvariantCulture,
+                            "State corruption detected; expected {0} but saw {1} in next list entry.",
+                            lastItem + 1,
+                            item));
+                    }
+
+                    await Task.Yield();
+                }
+            }
+            finally
+            {
+                l.Release(token);
+            }
         }
     }
 }


add TaskStatus component to not be translated, add description for it and TaskName

--- RelhaxModpack/RelhaxModpack/Translations/Translations.cs
+++ RelhaxModpack/RelhaxModpack/Translations/Translations.cs
@@ -53,7 +53,9 @@
             "SampleXmlOutputTextbox",
             //{0} kb of {1} kb
             "GcDownloadStep4DownloadingSizes",
+            //components of RelhaxInstallTaskReporter that should not get translated
             "TaskName",
+            "TaskStatus",
             //the name of the main relhax window
             "MainWindow"
         };


Added new file extensions for entries in QAR files

--- GzsTool.Core/Utility/Hashing.cs
+++ GzsTool.Core/Utility/Hashing.cs
@@ -85,6 +85,7 @@
             "gani",
             "geom",
             "ger.lng",
+            "gkn", // TODO: Unconfirmed placeholder for ID 1531
             "gpfp",
             "grxla",
             "grxoc",
@@ -155,6 +156,7 @@
             "vo.evf",
             "vpc",
             "wem",
+            "wmv",
             "xml"
         };


Just some refactorings

Just some refactorings

--- Hermod/Sockets/UDP/UDPSender.cs
+++ Hermod/Sockets/UDP/UDPSender.cs
@@ -20,6 +20,7 @@
 using System;
 using System.Net;
 using System.Net.Sockets;
+
 using eu.Vanaheimr.Styx;
 using eu.Vanaheimr.Hermod.Datastructures;

@@ -28,11 +29,63 @@
 namespace eu.Vanaheimr.Hermod.Sockets.UDP
 {

+    // For testing via NetCat use: 'nc -lup 5000'
+
+    #region UDPSender
+
+    /// <summary>
+    /// A generic UDP sender acceptiong Vanaheimr Stxy arrows
+    /// in order to send them through the internet.
+    /// </summary>
+    public class UDPSender : UDPSender<Byte[]>
+    {
+
+        #region UDPSender()
+
+        /// <summary>
+        /// Create a new UDP sender.
+        /// </summary>
+        public UDPSender()
+            : base(Message => Message)
+        { }
+
+        #endregion
+
+        #region UDPSender(Hostname, Port)
+
+        /// <summary>
+        /// Create a new UDP sender.
+        /// </summary>
+        /// <param name="Hostname">The hostname to send the UDP data.</param>
+        /// <param name="Port">The IP port to send the UDP data.</param>
+        public UDPSender(String Hostname, IPPort Port)
+            : base(Message => Message, Hostname, Port)
+        { }
+
+        #endregion
+
+        #region UDPSender(Hostname, Port)
+
+        /// <summary>
+        /// Create a new UDP sender.
+        /// </summary>
+        /// <param name="IPAddress">The IP address to send the UDP data.</param>
+        /// <param name="Port">The IP port to send the UDP data.</param>
+        public UDPSender(IIPAddress IPAddress, IPPort Port)
+            : base(Message => Message, IPAddress, Port)
+        { }
+
+        #endregion
+
+    }
+
+    #endregion
+
     #region UDPSender<T>

     /// <summary>
-    /// A generic UDP client acceptiong Vanaheimr Stxy arrows/notifications.
-    /// For testing via NetCat type: 'nc -lup 5000'
+    /// A generic UDP sender acceptiong Vanaheimr Stxy arrows
+    /// in order to send them through the internet.
     /// </summary>
     public class UDPSender<T> : IArrowReceiver<T>,
                                 IArrowReceiver<UDPPacket<T>>,
@@ -188,7 +241,7 @@
         /// Create a new UDPSender.
         /// </summary>
         /// <param name="MessageProcessor">A delegate to tranform the message into an array of bytes.</param>
-        private UDPSender(Func<T, Byte[]>  MessageProcessor)
+        public UDPSender(Func<T, Byte[]>  MessageProcessor)
         {

             if (MessageProcessor == null)
@@ -456,43 +509,4 @@

     #endregion

-    #region UDPSender
-
-    /// <summary>
-    /// A UDP client acceptiong Vanaheimr Stxy arrows/notifications.
-    /// For testing via NetCat type: 'nc -lup 5000'
-    /// </summary>
-    public class UDPSender : UDPSender<Byte[]>
-    {
-
-        #region UDPClient(Hostname, Port)
-
-        /// <summary>
-        /// Create a new UDPClient.
-        /// </summary>
-        /// <param name="Hostname">The hostname to send the UDP data.</param>
-        /// <param name="Port">The IP port to send the UDP data.</param>
-        public UDPSender(String Hostname, IPPort Port)
-            : base(msg => msg, Hostname, Port)
-        { }
-
-        #endregion
-
-        #region UDPClient(Hostname, Port)
-
-        /// <summary>
-        /// Create a new UDPClient.
-        /// </summary>
-        /// <param name="IPAddress">The IP address to send the UDP data.</param>
-        /// <param name="Port">The IP port to send the UDP data.</param>
-        public UDPSender(IIPAddress IPAddress, IPPort Port)
-            : base(msg => msg, IPAddress, Port)
-        { }
-
-        #endregion
-
-    }
-
-    #endregion
-
 }


CultureInfoLogic.CultureInfoModifier

CultureInfoLogic.CultureInfoModifier

--- Signum.Engine.Extensions/Translation/CultureInfoLogic.cs
+++ Signum.Engine.Extensions/Translation/CultureInfoLogic.cs
@@ -32,7 +32,9 @@
             sb.AssertDefined(ReflectionTools.GetMethodInfo(() => CultureInfoLogic.Start(null, null)));
         }

-        public static ResetLazy<Dictionary<CultureInfo, CultureInfoDN>> CultureInfoToEntity;
+        public static Func<CultureInfo, CultureInfo> CultureInfoModifier = ci => ci;
+
+        public static ResetLazy<Dictionary<string, CultureInfoDN>> CultureInfoToEntity;
         public static ResetLazy<Dictionary<CultureInfoDN, CultureInfo>> CultureInfoDNToCultureInfo;

         public static void Start(SchemaBuilder sb, DynamicQueryManager dqm)
@@ -52,10 +54,12 @@
                         c.NativeName,
                     });

-                CultureInfoToEntity = sb.GlobalLazy(() => Database.Query<CultureInfoDN>().ToDictionary(ci => CultureInfo.GetCultureInfo(ci.Name), ci=>ci),
+                CultureInfoToEntity = sb.GlobalLazy(() => Database.Query<CultureInfoDN>().ToDictionary(ci => ci.Name,
+                    ci => ci),
                     invalidateWith: new InvalidateWith(typeof(CultureInfoDN)));
-
-                CultureInfoDNToCultureInfo = sb.GlobalLazy(() => Database.Query<CultureInfoDN>().ToDictionary(ci => ci, ci => CultureInfo.GetCultureInfo(ci.Name)),
+
+                CultureInfoDNToCultureInfo = sb.GlobalLazy(() => Database.Query<CultureInfoDN>().ToDictionary(ci => ci,
+                    ci => CultureInfoModifier(CultureInfo.GetCultureInfo(ci.Name))),
                     invalidateWith: new InvalidateWith(typeof(CultureInfoDN)));

                 new Graph<CultureInfoDN>.Execute(CultureInfoOperation.Save)
@@ -82,26 +86,31 @@

         public static CultureInfoDN ToCultureInfoDN(this CultureInfo ci)
         {
-            return CultureInfoToEntity.Value.GetOrThrow(ci);
+            return CultureInfoToEntity.Value.GetOrThrow(ci.Name);
         }

         public static IEnumerable<CultureInfo> ApplicationCultures
         {
             get
             {
-                return CultureInfoToEntity.Value.Keys;
+                return CultureInfoDNToCultureInfo.Value.Values;
             }
         }

         public static IEnumerable<T> ForEachCulture<T>(Func<CultureInfoDN, T> func)
         {
-            foreach (var c in CultureInfoToEntity.Value)
+            foreach (var c in CultureInfoDNToCultureInfo.Value)
             {
-                using (Sync.ChangeBothCultures(c.Key))
+                using (Sync.ChangeBothCultures(c.Value))
                 {
-                    yield return func(c.Value);
+                    yield return func(c.Key);
                 }
             }
         }
+
+        public static CultureInfoDN GetCultureInfoDN(string cultureName)
+        {
+            return CultureInfoToEntity.Value.GetOrThrow(cultureName);
+        }
     }
 }


fix help

fix help

--- Signum.Web.Extensions/Help/Controllers/HelpController.cs
+++ Signum.Web.Extensions/Help/Controllers/HelpController.cs
@@ -94,23 +94,24 @@
             Stopwatch sp = new Stopwatch();
             sp.Start();
             Regex regex = new Regex(Regex.Escape(q.RemoveDiacritics()), RegexOptions.IgnoreCase);
-            List<SearchResult> results = (from eh in HelpLogic.GetEntitiesHelp()
-                                          from s in eh.Value.Search(regex)
-                                          select s).ToList();
+            List<List<SearchResult>> results = (from eh in HelpLogic.GetEntitiesHelp()
+                                                select eh.Value.Search(regex).ToList() into l
+                                                where l.Any()
+                                                select l).ToList();

             //We add the appendices
             results.AddRange(from a in HelpLogic.GetAppendices()
                              let result = a.Search(regex)
                              where result != null
-                             select result);
+                             select new List<SearchResult> { result });

             //We add the appendices
             results.AddRange(from a in HelpLogic.GetNamespaces()
                              let result = a.Search(regex)
                              where result != null
-                             select result);
-
-            results.Sort();
+                             select new List<SearchResult> { result });
+
+            results.Sort(a => a.First());

             sp.Stop();
             ViewData["time"] = sp.ElapsedMilliseconds;


[en] Trying to work around what looks like an issue with MEF (#2256).

git-tfs-id: [https://tfs.codeplex.com:443/tfs/TFS15]$/cyan;C41123

--- source/Zyan.Communication/Composition/IComponentCatalogMefExtensions.cs
+++ source/Zyan.Communication/Composition/IComponentCatalogMefExtensions.cs
@@ -120,6 +120,7 @@

 			// Dictionary: component -> owning container
 			var containers = new ConcurrentDictionary<object, CompositionContainer>();
+			var lockObject = new object();

 			// SingleCall component instance is created inside the child container
 			host.RegisterComponent<I>
@@ -144,7 +145,10 @@
 					// free child container and release non-shared MEF component
 					if (containers.TryRemove(component, out childContainer))
 					{
-						childContainer.Dispose();
+						lock (lockObject)
+						{
+							childContainer.Dispose();
+						}
 					}
 				}
 			);


demo of mixing fonts with emoji

demo of mixing fonts with emoji

--- samples/DrawWithImageSharp/Program.cs
+++ samples/DrawWithImageSharp/Program.cs
@@ -31,6 +31,8 @@

             RenderText(TwemojiMozilla, "😀", pointSize: 72, fallbackFonts: new[] { font2 });
             RenderText(emojiFont, "😀", pointSize: 72, fallbackFonts: new[] { font2 });
+            RenderText(font2, "abc😀def", pointSize: 72, fallbackFonts: new[] { emojiFont });
+            RenderText(font2, "😀 Hello World! 😀", pointSize: 72, fallbackFonts: new[] { emojiFont });

             //// general


Fix: logo name

Fix: logo name

--- GalleryMVC_With_Auth/Views/Shared/_Layout.cshtml
+++ GalleryMVC_With_Auth/Views/Shared/_Layout.cshtml
@@ -19,11 +19,11 @@

             </button>
-            @Html.ActionLink("Галерея", Defines.IndexView, Defines.HomeControllerName, null, new {@class = "navbar-brand"})
+            @Html.ActionLink("БелАрт", Defines.IndexView, Defines.HomeControllerName, null, new {@class = "navbar-brand"})

-
@Html.ActionLink("БелАрт", Defines.IndexView, new {controller = Defines.HomeControllerName}, new {@class = "home"})

+
@Html.ActionLink("Домой", Defines.IndexView, new {controller = Defines.HomeControllerName}, new {@class = "home"})

@Html.ActionLink("О нас", "About", new {controller = Defines.HomeControllerName}, new {@class = "about"})

@Html.ActionLink("Контакты", "Contact", new {controller = Defines.HomeControllerName}, new {@class = "contacts"})

@Html.ActionLink("Админ панель", Defines.IndexView, new {controller = "AdminPanel"}, new {@class = "admin"})


modify menu item name

modify menu item name

--- C3D.DataViewer/Controls/Point3DControl.Designer.cs
+++ C3D.DataViewer/Controls/Point3DControl.Designer.cs
@@ -227,7 +227,7 @@
             this.mnuShowResidual.CheckOnClick = true;
             this.mnuShowResidual.Name = "mnuShowResidual";
             this.mnuShowResidual.Size = new System.Drawing.Size(219, 22);
-            this.mnuShowResidual.Text = "Show Residual";
+            this.mnuShowResidual.Text = "Show Residual Point";
             this.mnuShowResidual.Click += new System.EventHandler(this.mnuShowResidual_Click);
             //
             // mnuShowMarker


Longer Script lease.

Longer Script lease.

--- common/Scripting/Script.cs
+++ common/Scripting/Script.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Runtime.Remoting.Lifetime;

 namespace StorybrewCommon.Scripting
 {
@@ -18,18 +19,16 @@
             }
         }

-        /*
         public override object InitializeLifetimeService()
         {
             ILease lease = (ILease)base.InitializeLifetimeService();
             if (lease.CurrentState == LeaseState.Initial)
             {
-                lease.InitialLeaseTime = TimeSpan.FromSeconds(2);
-                lease.SponsorshipTimeout = TimeSpan.FromSeconds(2);
-                lease.RenewOnCallTime = TimeSpan.FromSeconds(2);
+                lease.InitialLeaseTime = TimeSpan.FromMinutes(15);
+                //lease.SponsorshipTimeout = TimeSpan.FromSeconds(2);
+                lease.RenewOnCallTime = TimeSpan.FromMinutes(15);
             }
             return lease;
         }
-        */
     }
 }


Add TimeHMS class for time calculations.

--- gtksharp_clock/Program.cs
+++ gtksharp_clock/Program.cs
@@ -18,6 +18,162 @@
 			Application.Run();
 		}
 	}
+
+	/// <summary>
+	/// A representation of time, with only hours, minutes and seconds.
+	/// This is intended as a slightly "smart" struct. The class is a wrapper for
+	/// three doubles which can be set via batch update.
+	///
+	/// Note that each attribute contains the time data of the more granular attibutes, so
+	/// the time 00:30 will return both CurrentHours as 0.5 and CurrentMinutes as 30.0.
+	/// </summary>
+	public class TimeHMS
+	{
+		private double current_hours;
+		private double current_minutes;
+		private double current_seconds;
+
+		public TimeHMS()
+		{
+			UpdateTime();
+		}
+
+		/// <summary>
+		/// Updates the HMS representation to the current time.
+		/// </summary>
+		public void UpdateTime()
+		{
+			double milliseconds_of_day = DateTime.Now.TimeOfDay.TotalMilliseconds;
+			UpdateTime(milliseconds_of_day);
+		}
+
+		/// <summary>
+		/// Updates the HMS representation to a specified time.
+		/// </summary>
+		/// <param name="milliseconds_of_day">Milliseconds of day.</param>
+		public void UpdateTime(double milliseconds_of_day)
+		{
+			current_hours = (milliseconds_of_day / (60.0 * 60.0 * 1000.0)) % 24.0;
+			current_minutes = (milliseconds_of_day / (60.0 * 1000.0)) % 60.0;
+			current_seconds = (milliseconds_of_day / 1000.0) % 60.0;
+		}
+
+		/// <summary>
+		/// Gets the current hours.
+		/// </summary>
+		/// <value>The current hours.</value>
+		public double CurrentHours
+		{
+			get { return current_hours; }
+		}
+
+		/// <summary>
+		/// Gets the current minutes.
+		/// </summary>
+		/// <value>The current minutes.</value>
+		public double CurrentMinutes
+		{
+			get { return current_minutes; }
+		}
+
+		/// <summary>
+		/// Gets the current seconds.
+		/// </summary>
+		/// <value>The current seconds.</value>
+		public double CurrentSeconds
+		{
+			get { return current_seconds; }
+		}
+
+		/// <summary>
+		/// Convert back to milliseconds of day.
+		/// </summary>
+		/// <value>The milliseconds of day.</value>
+		public double MillisecondsOfDay
+		{
+			get { return current_hours * 3600.0 * 1000.0; }
+		}
+	}
+
+	/// <summary>
+	/// Test harness for TimeHMS.
+	/// </summary>
+	public class TimeHMSTests
+	{
+
+		/// <summary>
+		/// Verify the HMS conversions.
+		/// </summary>
+		/// <param name="milliseconds_of_day">Milliseconds of day.</param>
+		/// <param name="expected_hours">Expected hours.</param>
+		/// <param name="expected_minutes">Expected minutes.</param>
+		/// <param name="expected_seconds">Expected seconds.</param>
+		/// <param name="epsilon">Epsilon.</param>
+		[Test]
+		[TestCase(0, 0, 0, 0, 0.001)]
+		[TestCase(3600.0 * 1000.0, 1.0, 0, 0, 0.000001)] // 1h.
+		[TestCase(60.0 * 1000.0, 1.0/60, 1.0, 0, 0.0000001)] // 1m.
+		[TestCase(1.0 * 1000.0, 1.0 / 3600.0, 1/60.0, 1.0, 0.0000001)] // 1s.
+		[TestCase(50182113.33, 13.939475925925926, 56.36855555555555, 22.11333, 0.0000001)] // 13:56:22.11333
+		public void ConversionHMS(double milliseconds_of_day, double expected_hours, double expected_minutes, double expected_seconds, double epsilon)
+		{
+			var hms = new TimeHMS();
+			hms.UpdateTime(milliseconds_of_day);
+			Assert.IsTrue(hms.MillisecondsOfDay - epsilon <= milliseconds_of_day && milliseconds_of_day <= hms.MillisecondsOfDay + epsilon);
+			Assert.IsTrue(hms.CurrentHours - epsilon <= expected_hours && expected_hours <= hms.CurrentHours + epsilon);
+			Assert.IsTrue(hms.CurrentMinutes - epsilon <= expected_minutes && expected_minutes <= hms.CurrentMinutes + epsilon);
+			Assert.IsTrue(hms.CurrentSeconds - epsilon <= expected_seconds && expected_seconds <= hms.CurrentSeconds + epsilon);
+		}
+
+		/// <summary>
+		/// Test that updating a TimeHMS object
+		/// results in changed values from getters.
+		///
+		/// </summary>
+		/// <param name="time_pre">Time pre.</param>
+		/// <param name="time_post">Time post.</param>
+		[Test]
+		[TestCase(3400.0, 3232.0)]
+		[TestCase(3500.0, 0.0)]
+		public void UpdateCausesChange(double time_pre, double time_post)
+		{
+			var hms = new TimeHMS();
+
+			var epsilon = 0.001;
+			hms.UpdateTime(time_pre);
+			Assert.IsTrue(hms.MillisecondsOfDay - epsilon <= time_pre && time_pre <= hms.MillisecondsOfDay + epsilon);
+
+			var pre_hours = hms.CurrentHours;
+			var pre_minutes = hms.CurrentMinutes;
+			var pre_seconds = hms.CurrentSeconds;
+
+			hms.UpdateTime(time_post);
+			Assert.IsTrue(hms.MillisecondsOfDay - epsilon <= time_post && time_post <= hms.MillisecondsOfDay + epsilon);
+
+			Assert.AreNotEqual(hms.CurrentHours, pre_hours);
+			Assert.AreNotEqual(hms.CurrentMinutes, pre_minutes);
+			Assert.AreNotEqual(hms.CurrentSeconds, pre_seconds);
+		}
+
+		/// <summary>
+		/// Tests that we can round-trip convert from various times.
+		/// </summary>
+		[Test]
+		[TestCase(0.0, 0.001)]
+		[TestCase(0.001, 0.001)]
+		[TestCase(13.4 * 3600.0 * 1000.0, 0.001)]
+		public void ConversionRoundtrip(double milliseconds_of_day, double epsilon)
+		{
+			var hms = new TimeHMS();
+
+			hms.UpdateTime(milliseconds_of_day);
+			var reconverted = hms.MillisecondsOfDay;
+			Assert.IsTrue(milliseconds_of_day - epsilon <= reconverted && reconverted <= milliseconds_of_day + epsilon);
+
+		}
+
+	}
+

 	class ClockColors
 	{
@@ -250,7 +406,7 @@

 				var thepoints = from coord in coords
 								select new Gdk.Point(coord[0] + 300, coord[1] + 300);
-
+
 				this.GdkWindow.DrawPolygon(gc, true, thepoints.ToArray());
 			}
 		}
@@ -306,5 +462,4 @@
 			Assert.IsTrue(70.0 <= coords[1] && coords[1] <= 73.0, "For 7:30 y, actual coords are {0}, {1}", coords[0], coords[1]);
 		}
 	}
-
 }


hide overload that does not provide options

--- Source/MQTTnet.AspnetCore/ServiceCollectionExtensions.cs
+++ Source/MQTTnet.AspnetCore/ServiceCollectionExtensions.cs
@@ -44,7 +44,7 @@
             return services;
         }

-        public static IServiceCollection AddHostedMqttServer(this IServiceCollection services)
+        private static IServiceCollection AddHostedMqttServer(this IServiceCollection services)
         {
             var logger = new MqttNetLogger();
             var childLogger = logger.CreateChildLogger();


Added api method for getting rebuild links status

--- Source/Our.Umbraco.Nexu.Core/WebApi/NexuApiController.cs
+++ Source/Our.Umbraco.Nexu.Core/WebApi/NexuApiController.cs
@@ -69,14 +69,14 @@
         {
             var relations = this.nexuService.GetNexuRelationsForContent(contentId, false);

-            var relatedDocs = this.mappingEngine.Map<IEnumerable<RelatedDocument>>(relations.ToList());
-
-            //var response = new HttpResponseMessage(HttpStatusCode.OK);
-            //response.Content = new ObjectContent(typeof(IEnumerable<RelatedDocument>),relatedDocs, new AngularJsonMediaTypeFormatter());
-
-            //return response;
+            var relatedDocs = this.mappingEngine.Map<IEnumerable<RelatedDocument>>(relations.ToList());

             return this.Request.CreateResponse(HttpStatusCode.OK, relatedDocs);
-        }
+        }
+
+        public HttpResponseMessage GetRebuildStatus()
+        {
+            return new HttpResponseMessage(HttpStatusCode.InternalServerError);
+        }
     }
 }


loading extern call data

loading extern call data

--- rgatCore/ProtoGraph.cs
+++ rgatCore/ProtoGraph.cs
@@ -7,91 +7,120 @@

 namespace rgatCore
 {
-	struct EXTERNCALLDATA
-	{
-		public Tuple<uint,uint> edgeIdx;
-		public List<Tuple<int, string>> argList;
-	};
-
-	struct ROUTINE_STRUCT
-	{
-		public List<InstructionData> inslist;
-		public uint globalmodnum;
-		//list of threads that call this BB
-		//inside is list of the threads verts that call it
-		//it can exist multiple times on map so caller->this is listed
-		//  tid
-		public Dictionary<uint, List<Tuple<uint,uint>>> thread_callers;
-		public bool hasSymbol;
-	};
-
-	struct TAG
-	{
-		//come from trace
-		ulong blockaddr;
-		ulong blockID;
-		ulong insCount;
-		//used internally
-		int jumpModifier;
-		ROUTINE_STRUCT foundExtern;
-	};
-
-	class ProtoGraph
-	{
-		enum eLoopState { eNoLoop, eBuildingLoop, eLoopProgress };
-
-		public ProtoGraph(TraceRecord runrecord, uint threadID)
-		{
-			TraceData = runrecord;
-			ProcessData = runrecord.DisassemblyData;
-			ThreadID = threadID;
-		}
-
-
-		public uint ThreadID = 0;
-
-		private int nlockholder = 0;
-
-		public TraceIngestThread TraceReader { set; get; } = null;
-		public ProcessRecord ProcessData { private set; get; } = null;
-		public TraceRecord TraceData { private set; get; } = null;
-
-		//used to keep a blocking extern highlighted - may not be useful with new method TODO
-		private uint latest_active_node_idx = 0;
-		public DateTime ConstructedTime { private set; get; } = DateTime.Now;
-
-		private bool LoadNodes(JArray NodesArray, Dictionary<ulong, List<InstructionData>> disassembly)
-		{
-			foreach(JArray nodeItem in NodesArray)
-			{
-				NodeData n = new NodeData();//can't this be done at start?
-				if (!n.Deserialise(nodeItem, disassembly))
-				{
-					Console.WriteLine("Failed to deserialise node");
-					return false;
-				}
-
-				InsertNode(n.index, n);
-			}
-
-			return true;
-		}
-
-
-		private bool LoadExceptions(JArray exceptionsArray)
-		{
-			foreach (JToken entry in exceptionsArray)
-			{
-				if (entry.Type != JTokenType.Integer) return false;
-				ExceptionNodeIndexes.Add(entry.ToObject<uint>());
-			}
-			return true;
-		}
-		/*
-	private bool loadStats(const rapidjson::Value& graphData);
-	private bool loadAnimationData(const rapidjson::Value& replayArray);
-	private bool loadCallData(const rapidjson::Value& graphData);
-
+    struct EXTERNCALLDATA
+    {
+        public Tuple<uint, uint> edgeIdx;
+        public List<Tuple<int, string>> argList;
+    };
+
+    struct ROUTINE_STRUCT
+    {
+        public List<InstructionData> inslist;
+        public uint globalmodnum;
+        //list of threads that call this BB
+        //inside is list of the threads verts that call it
+        //it can exist multiple times on map so caller->this is listed
+        //  tid
+        public Dictionary<uint, List<Tuple<uint, uint>>> thread_callers;
+        public bool hasSymbol;
+    };
+
+    struct TAG
+    {
+        //come from trace
+        ulong blockaddr;
+        ulong blockID;
+        ulong insCount;
+        //used internally
+        int jumpModifier;
+        ROUTINE_STRUCT foundExtern;
+    };
+
+    class ProtoGraph
+    {
+        enum eLoopState { eNoLoop, eBuildingLoop, eLoopProgress };
+
+        public ProtoGraph(TraceRecord runrecord, uint threadID)
+        {
+            TraceData = runrecord;
+            ProcessData = runrecord.DisassemblyData;
+            ThreadID = threadID;
+        }
+
+
+        public uint ThreadID = 0;
+
+        private int nlockholder = 0;
+
+        public TraceIngestThread TraceReader { set; get; } = null;
+        public ProcessRecord ProcessData { private set; get; } = null;
+        public TraceRecord TraceData { private set; get; } = null;
+
+        //used to keep a blocking extern highlighted - may not be useful with new method TODO
+        private uint latest_active_node_idx = 0;
+        public DateTime ConstructedTime { private set; get; } = DateTime.Now;
+
+        private bool LoadNodes(JArray NodesArray, Dictionary<ulong, List<InstructionData>> disassembly)
+        {
+            foreach (JArray nodeItem in NodesArray)
+            {
+                NodeData n = new NodeData();//can't this be done at start?
+                if (!n.Deserialise(nodeItem, disassembly))
+                {
+                    Console.WriteLine("Failed to deserialise node");
+                    return false;
+                }
+
+                InsertNode(n.index, n);
+            }
+
+            return true;
+        }
+
+
+        private bool LoadExceptions(JArray exceptionsArray)
+        {
+            foreach (JToken entry in exceptionsArray)
+            {
+                if (entry.Type != JTokenType.Integer) return false;
+                ExceptionNodeIndexes.Add(entry.ToObject<uint>());
+            }
+            return true;
+        }
+        //private bool loadStats(const rapidjson::Value& graphData);
+        //private bool loadAnimationData(const rapidjson::Value& replayArray);
+        private bool LoadCallData(JArray callarray)
+        {
+            foreach (JArray entry in callarray)
+            {
+                if (entry.Count != 3 || entry[0].Type != JTokenType.Integer ||
+                    entry[1].Type != JTokenType.Integer || entry[2].Type != JTokenType.Array)
+                {
+                    Console.WriteLine("Error: Bad entry in LoadCallData");
+                    return false;
+                }
+
+                Tuple<uint, uint> edge = new Tuple<uint, uint>(entry[0].ToObject<uint>(), entry[1].ToObject<uint>());
+                List<Tuple<int, string>> CallArgList = new List<Tuple<int, string>>();
+
+                foreach (JArray argEntry in (JArray)entry[2])
+                {
+                    if (argEntry.Count != 2 || argEntry[0].Type != JTokenType.Integer || argEntry[1].Type != JTokenType.String)
+                        return false;
+
+                    Tuple<int, string> argData = new Tuple<int, string>(argEntry[0].ToObject<int>(), argEntry[1].ToString());
+                    CallArgList.Add(argData);
+                }
+
+                EXTERNCALLDATA callDat = new EXTERNCALLDATA();
+                callDat.argList = CallArgList;
+                callDat.edgeIdx = edge;
+                externCallRecords.Add(callDat);
+            }
+            return true;
+        }
+
+        /*

 	private bool set_target_instruction(InstructionData instruction);
 		private void BB_addNewEdge(bool alreadyExecuted, int instructionIndex, ulong repeats);
@@ -116,36 +145,36 @@

 		public void LinkBasicBlocks(List<InstructionData> source, List<InstructionData> target);
 		*/
-		void InsertNode(uint targVertID, NodeData node)
-		{
-			if (NodeList.Count > 0)
-				Debug.Assert(targVertID == NodeList[NodeList.Count-1].index + 1);
-
-			if (node.IsExternal)
-			{
-				//highlightsLock.lock () ;
-				externalNodeList.Add(node.index);
-				//highlightsLock.unlock();
-			}
-			else if (node.ins.hasSymbol)
-			{
-				//highlightsLock.lock () ;
-				internalNodeList.Add(node.index);
-				//highlightsLock.unlock();
-			}
-
-			//getNodeWriteLock();
-			NodeList.Add(node);
-			//dropNodeWriteLock();
-		}
-
-		//public bool edge_exists(NODEPAIR edge, edge_data** edged);
-		public void AddEdge(EdgeData e, NodeData source, NodeData target)
-        {
-
-        }
-
-		/*
+        void InsertNode(uint targVertID, NodeData node)
+        {
+            if (NodeList.Count > 0)
+                Debug.Assert(targVertID == NodeList[NodeList.Count - 1].index + 1);
+
+            if (node.IsExternal)
+            {
+                //highlightsLock.lock () ;
+                externalNodeList.Add(node.index);
+                //highlightsLock.unlock();
+            }
+            else if (node.ins.hasSymbol)
+            {
+                //highlightsLock.lock () ;
+                internalNodeList.Add(node.index);
+                //highlightsLock.unlock();
+            }
+
+            //getNodeWriteLock();
+            NodeList.Add(node);
+            //dropNodeWriteLock();
+        }
+
+        //public bool edge_exists(NODEPAIR edge, edge_data** edged);
+        public void AddEdge(EdgeData e, NodeData source, NodeData target)
+        {
+
+        }
+
+        /*
 		public void add_pending_arguments(int argpos, string contents, bool callDone);

 		public void handle_exception_tag(TAG &thistag);
@@ -159,9 +188,9 @@
 		//i feel like this misses the point, idea is to iterate safely
 		public EDGELIST* edgeLptr() { return &edgeList; }
 		*/
-		public List<NodeData> NodeList = new List<NodeData>(); //node id to node data
-		public List<BlockData> BlockList = new List<BlockData>(); //node id to node data
-		/*
+        public List<NodeData> NodeList = new List<NodeData>(); //node id to node data
+        public List<BlockData> BlockList = new List<BlockData>(); //node id to node data
+        /*
 		public bool node_exists(uint idx) { return (nodeList.Count > idx); }
 		public int get_num_nodes() { return nodeList.Count; }
 		public int get_num_edges() { return edgeDict.Count; }
@@ -185,14 +214,14 @@
 		List<ANIMATIONENTRY>* getSavedAnimData() { return &savedAnimationData; }

 		*/
-		//list of all external nodes
-		List<uint> externalNodeList = new List<uint>();
-		//List<uint> copyExternalNodeList();
-
-		//list of all internal nodes with symbols
-		List<uint> internalNodeList = new List<uint>();
-		//List<uint> copyInternalNodeList();
-		/*
+        //list of all external nodes
+        List<uint> externalNodeList = new List<uint>();
+        //List<uint> copyExternalNodeList();
+
+        //list of all internal nodes with symbols
+        List<uint> internalNodeList = new List<uint>();
+        //List<uint> copyInternalNodeList();
+        /*
 		//these are called a lot. make sure as efficient as possible
 		EdgeData get_edge(Tuple<uint,uint> edge)
         {
@@ -216,58 +245,58 @@
 		node_data* unsafe_get_node(uint index);
 		*/

-		NodeData safe_get_node(uint index)
-		{
-			if (index >= NodeList.Count)
-				return null;
-
-			//getNodeReadLock();
-			NodeData n = NodeList[(int)index];
-			//dropNodeReadLock();
-			return n;
-
-		}
-
-		bool LoadEdges(JArray EdgeArray)
-		{
-			foreach (JArray entry in EdgeArray.Children())
-			{
-				uint source = entry[0].ToObject<uint>();
-				uint target = entry[1].ToObject<uint>();
-				uint edgeClass = entry[2].ToObject<uint>();
-
-				EdgeData edge = new EdgeData();
-				edge.edgeClass = (eEdgeNodeType)edgeClass;
-
-				Tuple<uint,uint> stpair = new Tuple<uint, uint>(source, target);
-				AddEdge(edge, safe_get_node(source), safe_get_node(target));
-			}
-			return true;
-		}
-
-
-		/*
+        NodeData safe_get_node(uint index)
+        {
+            if (index >= NodeList.Count)
+                return null;
+
+            //getNodeReadLock();
+            NodeData n = NodeList[(int)index];
+            //dropNodeReadLock();
+            return n;
+
+        }
+
+        bool LoadEdges(JArray EdgeArray)
+        {
+            foreach (JArray entry in EdgeArray.Children())
+            {
+                uint source = entry[0].ToObject<uint>();
+                uint target = entry[1].ToObject<uint>();
+                uint edgeClass = entry[2].ToObject<uint>();
+
+                EdgeData edge = new EdgeData();
+                edge.edgeClass = (eEdgeNodeType)edgeClass;
+
+                Tuple<uint, uint> stpair = new Tuple<uint, uint>(source, target);
+                AddEdge(edge, safe_get_node(source), safe_get_node(target));
+            }
+            return true;
+        }
+
+
+        /*
 		void push_anim_update(ANIMATIONENTRY);
 		//animation data received from target
 		List<ANIMATIONENTRY> savedAnimationData;

 		*/
-		//todo rename
-		List<uint> ExceptionNodeIndexes;
-
-		public void AssignModulePath()
-		{
-			exeModuleID = safe_get_node(0).GlobalModuleID;
-			if (exeModuleID >= ProcessData.LoadedModulePaths.Count) return;
-
-			string ModulePath = ProcessData.LoadedModulePaths[exeModuleID];
-			moduleBase = TraceData.DisassemblyData.LoadedModuleBounds[exeModuleID].Item1;
-
-
-			if (ModulePath.Length > UI_Constants.MAX_DIFF_PATH_LENGTH)
-				ModulePath = ".." + ModulePath.Substring(ModulePath.Length - UI_Constants.MAX_DIFF_PATH_LENGTH, ModulePath.Length);
-		}
-		/*
+        //todo rename
+        List<uint> ExceptionNodeIndexes;
+
+        public void AssignModulePath()
+        {
+            exeModuleID = safe_get_node(0).GlobalModuleID;
+            if (exeModuleID >= ProcessData.LoadedModulePaths.Count) return;
+
+            string ModulePath = ProcessData.LoadedModulePaths[exeModuleID];
+            moduleBase = TraceData.DisassemblyData.LoadedModuleBounds[exeModuleID].Item1;
+
+
+            if (ModulePath.Length > UI_Constants.MAX_DIFF_PATH_LENGTH)
+                ModulePath = ".." + ModulePath.Substring(ModulePath.Length - UI_Constants.MAX_DIFF_PATH_LENGTH, ModulePath.Length);
+        }
+        /*
 		public ulong BacklogOutgoing = 0;
 		public ulong BacklogIncoming = 0;

@@ -278,57 +307,60 @@

 		*/

-		bool terminationFlag = false;
-		//bool serialise(rapidjson::Writer<rapidjson::FileWriteStream>& writer);
-
-		public bool Deserialise(JObject graphData, Dictionary<ulong, List<InstructionData>> disassembly)
-		{
-			if (!graphData.TryGetValue("Nodes", out JToken jNodes) || jNodes.Type != JTokenType.Array)
-			{
-				Console.WriteLine("[rgat] Failed to find valid Nodes in trace");
-				return false;
-			}
-			JArray NodesArray = (JArray)jNodes;
-			if (!LoadNodes(NodesArray, disassembly)) {
-				Console.WriteLine("[rgat]ERROR: Failed to load nodes");
-				return false;
-			}
-
-			if (!graphData.TryGetValue("Edges", out JToken jEdges) || jEdges.Type != JTokenType.Array)
-			{
-				Console.WriteLine("[rgat] Failed to find valid Edges in trace");
-				return false;
-			}
-			JArray EdgeArray = (JArray)jEdges;
-			if (!LoadEdges(EdgeArray))
-			{
-				Console.WriteLine("[rgat]ERROR: Failed to load edges");
-				return false;
-			}
-
-			if (!graphData.TryGetValue("Exceptions", out JToken jExcepts) || jEdges.Type != JTokenType.Array)
-			{
-				Console.WriteLine("[rgat] Failed to find valid Exceptions in trace");
-				return false;
-			}
-			JArray ExceptionArray = (JArray)jExcepts;
-			if (!LoadExceptions(EdgeArray))
-			{
-				Console.WriteLine("[rgat]ERROR: Failed to load Exceptions");
-				return false;
-			}
-
-
-
-			/*
-			graphDataIt = graphData.FindMember("ExternCalls");
-			if (graphDataIt == graphData.MemberEnd())
-			{
-				cerr << "[rgat] Error: Failed to find extern calls data" << endl;
-				return false;
-			}
-			if (!loadCallData(graphDataIt->value)) { cerr << "[rgat]ERROR: Failed to load extern call data" << endl; return false; }
-
+        bool terminationFlag = false;
+        //bool serialise(rapidjson::Writer<rapidjson::FileWriteStream>& writer);
+
+        public bool Deserialise(JObject graphData, Dictionary<ulong, List<InstructionData>> disassembly)
+        {
+            if (!graphData.TryGetValue("Nodes", out JToken jNodes) || jNodes.Type != JTokenType.Array)
+            {
+                Console.WriteLine("[rgat] Failed to find valid Nodes in trace");
+                return false;
+            }
+            JArray NodesArray = (JArray)jNodes;
+            if (!LoadNodes(NodesArray, disassembly))
+            {
+                Console.WriteLine("[rgat]ERROR: Failed to load nodes");
+                return false;
+            }
+
+            if (!graphData.TryGetValue("Edges", out JToken jEdges) || jEdges.Type != JTokenType.Array)
+            {
+                Console.WriteLine("[rgat] Failed to find valid Edges in trace");
+                return false;
+            }
+            JArray EdgeArray = (JArray)jEdges;
+            if (!LoadEdges(EdgeArray))
+            {
+                Console.WriteLine("[rgat]ERROR: Failed to load edges");
+                return false;
+            }
+
+            if (!graphData.TryGetValue("Exceptions", out JToken jExcepts) || jEdges.Type != JTokenType.Array)
+            {
+                Console.WriteLine("[rgat] Failed to find valid Exceptions in trace");
+                return false;
+            }
+            JArray ExceptionArray = (JArray)jExcepts;
+            if (!LoadExceptions(EdgeArray))
+            {
+                Console.WriteLine("[rgat]ERROR: Failed to load Exceptions");
+                return false;
+            }
+
+            if (!graphData.TryGetValue("ExternCalls", out JToken jExternCalls) || jExternCalls.Type != JTokenType.Array)
+            {
+                Console.WriteLine("[rgat] Failed to find valid ExternCalls in trace");
+                return false;
+            }
+            JArray ExternCallsArray = (JArray)jExternCalls;
+            if (!LoadCallData(ExternCallsArray))
+            {
+                Console.WriteLine("[rgat]ERROR: Failed to load ExternCalls");
+                return false;
+            }
+
+            /*

 			graphDataIt = graphData.FindMember("ReplayData");
 			if (graphDataIt == graphData.MemberEnd())
@@ -341,56 +373,56 @@
 			if (!loadStats(graphData)) { cerr << "[rgat]ERROR: Failed to load graph stats" << endl; return false; }
 			*/

-			return true;
-
-		}
-		/*
+            return true;
+
+        }
+        /*
 		bool instructions_to_nodepair(InstructionData sourceIns, InstructionData targIns, NODEPAIR &result);
 		*/
-		List<EXTERNCALLDATA> externCallRecords;
-		ulong totalInstructions = 0;
-		int exeModuleID = -1;
-		ulong moduleBase = 0;
-		string modulePath;
-		Dictionary<ulong, uint> internalPlaceholderFuncNames;
-
-		uint lastNode = 0;
-		//used by heatDictionary solver
-		uint finalNodeID = 0;
-
-		//important state variables!
-		uint lastVertID = 0; //the vert that led to new instruction
-		uint targVertID = 0; //new vert we are creating
-		eEdgeNodeType lastNodeType = eEdgeNodeType.eFIRST_IN_THREAD;
-
-		ulong loopIterations = 0;
-		uint firstLoopVert = 0;
-		eLoopState loopState = eLoopState.eNoLoop;
-		//tag address, mod type
-		List<TAG> loopCache;
-		Tuple<uint, uint> repeatStart;
-		Tuple<uint, uint> repeatEnd;
-
-		List<string> loggedCalls;
-
-		//number of times an external function has been called. used to Dictionary arguments to calls
-		Dictionary<Tuple<ulong, ulong>, ulong> externFuncCallCounter;
-
-		bool terminated = false;
-		bool updated = true;
-
-		void set_terminated()
-		{
-			terminated = true;
-			updated = true; //aka needvboreloadpreview
-			terminationFlag = true;
-			IsActive = false;
-			finalNodeID = lastVertID;
-		}
-
-		//void start_edgeL_iteration(EDGELIST::iterator* edgeIt, EDGELIST::iterator* edgeEnd);
-		//void stop_edgeL_iteration();
-
-		public bool IsActive = true;
-	}
+        List<EXTERNCALLDATA> externCallRecords;
+        ulong totalInstructions = 0;
+        int exeModuleID = -1;
+        ulong moduleBase = 0;
+        string modulePath;
+        Dictionary<ulong, uint> internalPlaceholderFuncNames;
+
+        uint lastNode = 0;
+        //used by heatDictionary solver
+        uint finalNodeID = 0;
+
+        //important state variables!
+        uint lastVertID = 0; //the vert that led to new instruction
+        uint targVertID = 0; //new vert we are creating
+        eEdgeNodeType lastNodeType = eEdgeNodeType.eFIRST_IN_THREAD;
+
+        ulong loopIterations = 0;
+        uint firstLoopVert = 0;
+        eLoopState loopState = eLoopState.eNoLoop;
+        //tag address, mod type
+        List<TAG> loopCache;
+        Tuple<uint, uint> repeatStart;
+        Tuple<uint, uint> repeatEnd;
+
+        List<string> loggedCalls;
+
+        //number of times an external function has been called. used to Dictionary arguments to calls
+        Dictionary<Tuple<ulong, ulong>, ulong> externFuncCallCounter;
+
+        bool terminated = false;
+        bool updated = true;
+
+        void set_terminated()
+        {
+            terminated = true;
+            updated = true; //aka needvboreloadpreview
+            terminationFlag = true;
+            IsActive = false;
+            finalNodeID = lastVertID;
+        }
+
+        //void start_edgeL_iteration(EDGELIST::iterator* edgeIt, EDGELIST::iterator* edgeEnd);
+        //void stop_edgeL_iteration();
+
+        public bool IsActive = true;
+    }
 }


Update check question part

Update check question part

--- Ict4Participation/Admin_Layer/Check.cs
+++ Ict4Participation/Admin_Layer/Check.cs
@@ -203,9 +203,6 @@
             return true;
         }

-        /*
-         * TODO: PURE AIDS
-         *
         /// <summary>
         /// check the question details for correct input
         /// </summary>
@@ -234,21 +231,38 @@
                 message = "Geen skills toegevoegd!";
                 return false;
             }
-            if (DateTime.Subtract(qd.StartDate, DateTime.Now) < 0)
-            {
+
+
+            bool isStartDateNull = true;
+            bool isEndDateNull = true;
+            if (qd.StartDate != null)
+            {
+                if ( ((DateTime)qd.StartDate).Subtract(DateTime.Now) < TimeSpan.Zero)
+                {
                 message = "De begintijd is al geweest!";
                 return false;
-            }
-            if (DateTime.Compare(endDate, DateTime.Now) < 0)
-            {
+                }
+                isStartDateNull = false;
+            }
+            if (qd.StartDate != null)
+            {
+                if ( ((DateTime)qd.EndDate).Subtract(DateTime.Now) < TimeSpan.Zero)
+                {
                 message = "De eindtijd is al geweest!";
-                return;
-            }
-            if (DateTime.Compare(startDate, endDate) > 0)
-            {
-                message = "De einddatum mag niet eerder zijn dan/gelijk zijn aan de startdatum!";
-                return;
-            }
+                return false;
+                }
+                isEndDateNull = false;
+            }
+            if (!isEndDateNull && !isStartDateNull)
+            {
+                if ((DateTime)qd.StartDate < (DateTime)qd.EndDate)
+                {
+                    message = "De einddatum mag niet eerder zijn dan/gelijk zijn aan de startdatum!";
+                    return false;
+                }
+            }
+            message = "Vraag succesvol aangemaakt";
+            return true;
         }
         /// <summary>
         /// check if the string is null or empty
@@ -268,7 +282,5 @@
         {
             return Content ==0;
         }
-
-        }*/
     }
 }


Throw InvalidRequestException if that payload is received instead of HttpFound

--- IronSmarkets/Clients/SmarketsClient.cs
+++ IronSmarkets/Clients/SmarketsClient.cs
@@ -27,6 +27,7 @@

 using IronSmarkets.Data;
 using IronSmarkets.Events;
+using IronSmarkets.Exceptions;
 using IronSmarkets.Sessions;

 namespace IronSmarkets.Clients
@@ -101,7 +102,7 @@
             _httpHandler = new HttpFoundHandler<Proto.Seto.Events>(_settings.HttpRequestTimeout);

             _eventsRequestHandler = new SeqRpcHandler<Proto.Seto.Events, IEventMap>(
-                this, EventMap.FromSeto, _httpHandler.BeginFetchHttpFound);
+                this, EventMap.FromSeto, ExtractEventResponse);
             _accountStateRequestHandler = new SeqRpcHandler<Proto.Seto.AccountState, AccountState>(
                 this, AccountState.FromSeto, (req, payload) => { req.Response = payload.AccountState; });
             _marketQuotesRequestHandler = new UidQueueRpcHandler<Proto.Seto.MarketQuotes, MarketQuotes>(
@@ -113,6 +114,20 @@
             _orderCreateRequestHandler = new OrderCreateRequestHandler(this);
         }

+        private void ExtractEventResponse(
+            SyncRequest<Proto.Seto.Events> request, Proto.Seto.Payload payload)
+        {
+            switch (payload.Type)
+            {
+                case Proto.Seto.PayloadType.PAYLOADINVALIDREQUEST:
+                    request.SetException(InvalidRequestException.FromSeto(payload.InvalidRequest));
+                    break;
+                case Proto.Seto.PayloadType.PAYLOADHTTPFOUND:
+                    _httpHandler.BeginFetchHttpFound(request, payload);
+                    break;
+            }
+        }
+
         public static ISmarketsClient Create(IClientSettings settings)
         {
             return new SmarketsClient(settings);
@@ -430,6 +445,7 @@
         {
             switch (payload.Type)
             {
+                case Proto.Seto.PayloadType.PAYLOADINVALIDREQUEST:
                 case Proto.Seto.PayloadType.PAYLOADHTTPFOUND:
                     _eventsRequestHandler.Handle(payload);
                     break;


realized that i had duplicate code and is was causing issues.

--- JohnMoore.AmpacheNet/AmpacheService.cs
+++ JohnMoore.AmpacheNet/AmpacheService.cs
@@ -93,24 +93,6 @@
 			Start(stream);
 			_player = new AndroidPlayer(_model, ApplicationContext);
 			_notifications = new AmpacheNotifications(this.ApplicationContext, _model);
-            Task.Factory.StartNew(() =>
-                {
-                    var config = LoadPersistedConfiguration();
-                    if (config != null && !string.IsNullOrEmpty(config.ServerUrl))
-                    {
-                        try
-                        {
-                            _model.Factory.AuthenticateToServer(config);
-                            _model.Configuration = config;
-                            _model.UserMessage = "Connected to Ampache!";
-                        }
-                        catch (Exception e)
-                        {
-                            Console.WriteLine("Failed to Authenticate, bailing on the existing configuration");
-                            _model.UserMessage = "Failed to connect to Ampache, verify configuration";
-                        }
-                    }
-                });
 			var telSvc = this.ApplicationContext.GetSystemService(Context.TelephonyService) as Android.Telephony.TelephonyManager;
 			if(telSvc != null) {
 				telSvc.Listen(new AmpachePhoneStateListener(_model), Android.Telephony.PhoneStateListenerFlags.CallState);


fix layout on add to project form

fix layout on add to project form

--- Joinrpg/Views/User/AddToProject.cshtml
+++ Joinrpg/Views/User/AddToProject.cshtml
@@ -15,15 +15,15 @@
                ProjectId = Model.ProjectsToAdd.Select(p => p.ProjectId).First()
            }; }

-            @Html.LabelFor(model => acl.ProjectId, htmlAttributes: new { @class = "control-label col-md-5", @for = "CanManageClaims" })
-

+            @Html.LabelFor(model => acl.ProjectId, htmlAttributes: new { @class = "control-label col-md-3", @for = "CanManageClaims" })
+

                 @Html.EditorFor(model => acl.ProjectId, "ProjectDropDown", "ProjectId", new {Projects = Model.ProjectsToAdd})

-            @Html.LabelFor(model => acl.CanManageClaims, htmlAttributes: new {@class = "control-label col-md-5", @for = "CanManageClaims"})
-

+            @Html.LabelFor(model => acl.CanManageClaims, htmlAttributes: new {@class = "control-label col-md-3", @for = "CanManageClaims"})
+

                     @Html.EditorFor(model => acl.CanManageClaims, null, htmlFieldName: "CanManageClaims")
                     @Html.DescriptionFor(model => acl.CanManageClaims)
@@ -33,8 +33,8 @@

-            @Html.LabelFor(model => acl.CanChangeFields, htmlAttributes: new {@class = "control-label col-md-5", @for = "CanChangeFields"})
-

+            @Html.LabelFor(model => acl.CanChangeFields, htmlAttributes: new {@class = "control-label col-md-3", @for = "CanChangeFields"})
+

                     @Html.EditorFor(model => acl.CanChangeFields, null, htmlFieldName: "CanChangeFields")
                     @Html.DescriptionFor(model => acl.CanChangeFields)
@@ -44,8 +44,8 @@

-            @Html.LabelFor(model => acl.CanChangeProjectProperties, htmlAttributes: new {@class = "control-label col-md-5", @for = "CanChangeProjectProperties"})
-

+            @Html.LabelFor(model => acl.CanChangeProjectProperties, htmlAttributes: new {@class = "control-label col-md-3", @for = "CanChangeProjectProperties"})
+

                     @Html.EditorFor(model => acl.CanChangeProjectProperties, null, htmlFieldName: "CanChangeProjectProperties")
                     @Html.DescriptionFor(model => acl.CanChangeProjectProperties)
@@ -55,8 +55,8 @@

-            @Html.LabelFor(model => acl.CanGrantRights, htmlAttributes: new {@class = "control-label col-md-5", @for = "CanGrantRights"})
-

+            @Html.LabelFor(model => acl.CanGrantRights, htmlAttributes: new {@class = "control-label col-md-3", @for = "CanGrantRights"})
+

                     @Html.EditorFor(model => acl.CanGrantRights, null, htmlFieldName: "CanGrantRights")
                     @Html.DescriptionFor(model => acl.CanGrantRights)
@@ -66,8 +66,8 @@

-            @Html.LabelFor(model => acl.CanEditRoles, htmlAttributes: new {@class = "control-label col-md-5", @for = "CanEditRoles"})
-

+            @Html.LabelFor(model => acl.CanEditRoles, htmlAttributes: new {@class = "control-label col-md-3", @for = "CanEditRoles"})
+

                     @Html.EditorFor(model => acl.CanEditRoles, null, htmlFieldName: "CanEditRoles")
                     @Html.DescriptionFor(model => acl.CanEditRoles)
@@ -77,8 +77,8 @@

-            @Html.LabelFor(model => acl.CanManageMoney, htmlAttributes: new {@class = "control-label col-md-5", @for = "CanManageMoney"})
-

+            @Html.LabelFor(model => acl.CanManageMoney, htmlAttributes: new {@class = "control-label col-md-3", @for = "CanManageMoney"})
+

                     @Html.EditorFor(model => acl.CanManageMoney, null, htmlFieldName: "CanManageMoney")
                     @Html.DescriptionFor(model => acl.CanManageMoney)
@@ -88,8 +88,8 @@

-            @Html.LabelFor(model => acl.CanSendMassMails, htmlAttributes: new {@class = "control-label col-md-5", @for = "CanSendMassMails"})
-

+            @Html.LabelFor(model => acl.CanSendMassMails, htmlAttributes: new {@class = "control-label col-md-3", @for = "CanSendMassMails"})
+

                     @Html.EditorFor(model => acl.CanSendMassMails, null, htmlFieldName: "CanSendMassMails")
                     @Html.DescriptionFor(model => acl.CanSendMassMails)
@@ -99,8 +99,8 @@

-            @Html.LabelFor(model => acl.CanManagePlots, htmlAttributes: new {@class = "control-label col-md-5", @for = "CanManagePlots"})
-

+            @Html.LabelFor(model => acl.CanManagePlots, htmlAttributes: new {@class = "control-label col-md-3", @for = "CanManagePlots"})
+

                     @Html.EditorFor(model => acl.CanManagePlots, null, htmlFieldName: "CanManagePlots")
                     @Html.DescriptionFor(model => acl.CanManagePlots)


Allowed admin.

Allowed admin.

--- CacheUpFront.Autofac/ContainerBuilderExtensions.cs
+++ CacheUpFront.Autofac/ContainerBuilderExtensions.cs
@@ -33,7 +33,7 @@
             {
                 var redisOptions = new ConfigurationOptions
                 {
-                    AllowAdmin = false,
+                    AllowAdmin = true,
                     Ssl = false,
                     AbortOnConnectFail = entityCacheOptions.AbortOnConnectFail
                 };


Execute the "run" command by default

Execute the "run" command by default

--- Source/Totem.Runtime/Hosting/Commands/HostCommandLine.cs
+++ Source/Totem.Runtime/Hosting/Commands/HostCommandLine.cs
@@ -50,7 +50,7 @@
 			{
 				return new PassThroughCommand();
 			}
-			else if(VerbIs("run"))
+			else if(VerbIsAny("", "run"))
 			{
 				return new RunCommand();
 			}


More regression tests for Table bindings. Add tests for { } support ion [Table] TableName property. No product change.

--- test/Microsoft.Azure.WebJobs.Host.FunctionalTests/TableTests.cs
+++ test/Microsoft.Azure.WebJobs.Host.FunctionalTests/TableTests.cs
@@ -14,6 +14,7 @@
 using Microsoft.Azure.WebJobs.Host.Storage.Queue;
 using Microsoft.Azure.WebJobs.Host.Storage.Table;
 using Microsoft.Azure.WebJobs.Host.Tables;
+using Microsoft.Azure.WebJobs.Host.TestCommon;
 using Microsoft.WindowsAzure.Storage.Queue;
 using Microsoft.WindowsAzure.Storage.Table;
 using Newtonsoft.Json;
@@ -53,7 +54,32 @@

             Utility.AssertIndexingError<TableOutProgram>("Run", "Can't bind Table entity to type 'Microsoft.Azure.WebJobs.Host.FunctionalTests.TableTests+Poco&'.");
             Utility.AssertIndexingError<TableOutArrayProgram>("Run", "Can't bind Table entity to type 'Microsoft.Azure.WebJobs.Host.FunctionalTests.TableTests+Poco[]&'.");
-        }
+        }
+
+        // Helper to demonstrate that TableName property can include { } pairs.
+        private class BindToICollectorITableEntityResolvedTableProgram
+        {
+            public static void Run(
+                [Table("Ta{t1}")] ICollector<Poco> table1,
+                [Table("{t1}x{t1}")] ICollector<Poco> table2)
+            {
+                table1.Add(new Poco { PartitionKey = PartitionKey, RowKey = RowKey, Property = "123" });
+                table2.Add(new Poco { PartitionKey = PartitionKey, RowKey = RowKey, Property = "456" });
+            }
+        }
+
+        // TableName can have {  } pairs.
+        [Fact]
+        public void Table_ResolvedName()
+        {
+            IStorageAccount account = new FakeStorageAccount();
+            var host = TestHelpers.NewJobHost<BindToICollectorITableEntityResolvedTableProgram>(account);
+
+            host.Call("Run", new { t1 = "ZZ" });
+
+            AssertStringProperty(account, "Property", "123", "TaZZ");
+            AssertStringProperty(account, "Property", "456", "ZZxZZ");
+        }

         [Fact]
         public void Table_IfBoundToCustomTableBindingExtension_BindsCorrectly()
@@ -133,17 +159,7 @@
             RunTrigger(account, typeof(BindToICollectorITableEntityProgram));

             // Assert
-            IStorageTableClient client = account.CreateTableClient();
-            IStorageTable table = client.GetTableReference(TableName);
-            Assert.True(table.Exists());
-            DynamicTableEntity entity = table.Retrieve<DynamicTableEntity>(PartitionKey, RowKey);
-            Assert.NotNull(entity);
-            Assert.NotNull(entity.Properties);
-            Assert.True(entity.Properties.ContainsKey(PropertyName));
-            EntityProperty property = entity.Properties[PropertyName];
-            Assert.NotNull(property);
-            Assert.Equal(EdmType.String, property.PropertyType);
-            Assert.Equal(expectedValue, property.StringValue);
+            AssertStringProperty(account, PropertyName, expectedValue);
         }

         [Fact]
@@ -159,17 +175,7 @@
             RunTrigger(account, typeof(BindToICollectorPocoProgram));

             // Assert
-            IStorageTableClient client = account.CreateTableClient();
-            IStorageTable table = client.GetTableReference(TableName);
-            Assert.True(table.Exists());
-            DynamicTableEntity entity = table.Retrieve<DynamicTableEntity>(PartitionKey, RowKey);
-            Assert.NotNull(entity);
-            Assert.NotNull(entity.Properties);
-            Assert.True(entity.Properties.ContainsKey(PropertyName));
-            EntityProperty property = entity.Properties[PropertyName];
-            Assert.NotNull(property);
-            Assert.Equal(EdmType.String, property.PropertyType);
-            Assert.Equal(expectedValue, property.StringValue);
+            AssertStringProperty(account, PropertyName, expectedValue);
         }

         [Fact]
@@ -373,6 +379,29 @@
             Assert.False(actualValue.HasValue);
         }

+        // Assert the given table has the given entity with PropertyName=ExpectedValue
+        void AssertStringProperty(
+            IStorageAccount account,
+            string propertyName,
+            string expectedValue,
+            string tableName = TableName,
+            string partitionKey = PartitionKey,
+            string rowKey = RowKey)
+        {
+            // Assert
+            IStorageTableClient client = account.CreateTableClient();
+            IStorageTable table = client.GetTableReference(tableName);
+            Assert.True(table.Exists());
+            DynamicTableEntity entity = table.Retrieve<DynamicTableEntity>(partitionKey, rowKey);
+            Assert.NotNull(entity);
+            Assert.NotNull(entity.Properties);
+            Assert.True(entity.Properties.ContainsKey(propertyName));
+            EntityProperty property = entity.Properties[propertyName];
+            Assert.NotNull(property);
+            Assert.Equal(EdmType.String, property.PropertyType);
+            Assert.Equal(expectedValue, property.StringValue);
+        }
+
         private static IStorageAccount CreateFakeStorageAccount()
         {
             return new FakeStorageAccount();


fix test

fix test

--- Spa2/NakedObjects.Spa.Selenium.Test/tests/DialogTests.cs
+++ Spa2/NakedObjects.Spa.Selenium.Test/tests/DialogTests.cs
@@ -78,11 +78,12 @@
             OpenSubMenu("Orders");
             OpenActionDialog("Search For Orders");
             var fromDate = WaitForCss("#fromdate1");
-            Assert.AreEqual("2000-01-01", fromDate.GetAttribute("value")); //Default field value
-            ClearFieldThenType("#fromdate1", "01 09 2007");
+            Assert.AreEqual("1 Jan 2000", fromDate.GetAttribute("value")); //Default field value
+            ClearFieldThenType("#fromdate1", "01/09/2007");
             //CancelDatePicker("#fromdate1");
-            ClearFieldThenType("#todate1", "01 04 2008");
+            ClearFieldThenType("#todate1", "01/04/2008");
             //CancelDatePicker("#todate1");
+            Thread.Sleep(1000);
             Click(OKButton());
             WaitForView(Pane.Single, PaneType.List, "Search For Orders");
             var details = WaitForCss(".summary .details");


Allow ExpandoObjectConverter under Portable40 platform

--- Src/Newtonsoft.Json/Converters/ExpandoObjectConverter.cs
+++ Src/Newtonsoft.Json/Converters/ExpandoObjectConverter.cs
@@ -23,7 +23,7 @@
 // OTHER DEALINGS IN THE SOFTWARE.
 #endregion

-#if !(NET35 || NET20 || PORTABLE40)
+#if !(NET35 || NET20 || PORTABLE)

 using System;
 using System.Collections.Generic;


Fixing bug where changing identifier of template does not update references to it

--- Trifolia.Web/Controllers/API/TemplateEditorController.cs
+++ Trifolia.Web/Controllers/API/TemplateEditorController.cs
@@ -505,6 +505,7 @@
         private Template SaveTemplate(IObjectRepository tdb, TemplateMetaDataModel model)
         {
             Template template = null;
+            bool isNew = false;

             // Create the initial template object and add it to the appropriate list (if it is new)
             if (model.Id != null)
@@ -515,6 +516,7 @@
             {
                 template = new Template();
                 tdb.Templates.Add(template);
+                isNew = true;
             }

             // Set the properties
@@ -539,7 +541,22 @@
                 template.Name = model.Name;

             if (template.Oid != model.Oid)
+            {
+                // If it is not a new template, there may be refernces to the template
+                // in the TemplateConstraintReferences table representing the plain-string
+                // identifier of this template. Update those references.
+                if (!isNew)
+                {
+                    var references = tdb.TemplateConstraintReferences.Where(y => y.ReferenceIdentifier == template.Oid && y.ReferenceType == ConstraintReferenceTypes.Template);
+
+                    foreach (var reference in references)
+                    {
+                        reference.ReferenceIdentifier = model.Oid;
+                    }
+                }
+
                 template.Oid = model.Oid;
+            }

             if (template.Bookmark != model.Bookmark)
                 template.Bookmark = model.Bookmark;


Fixing bug in saving templates where "existing" references in constraints aren't being found.

--- Trifolia.Web/Controllers/API/TemplateEditorController.cs
+++ Trifolia.Web/Controllers/API/TemplateEditorController.cs
@@ -623,8 +623,9 @@

         private void SaveConstraintReferences(IObjectRepository tdb, TemplateConstraint constraint, List<ConstraintReferenceModel> references)
         {
-            List<TemplateConstraintReference> existing = constraint.References.ToList();
-
+            var existing = this.tdb.TemplateConstraintReferences.Where(y => y.TemplateConstraintId == constraint.Id).ToList();
+
+            // Add references that don't exist yet
             foreach (var referenceModel in references)
             {
                 if (existing.Any(y => y.ReferenceType == ConstraintReferenceTypes.Template && y.ReferenceIdentifier == referenceModel.ReferenceIdentifier))
@@ -640,11 +641,13 @@
                 constraint.References.Add(newConstraintReference);
             }

-            List<TemplateConstraintReference> removeReferences = existing.Where(y => !references.Any(x => x.ReferenceIdentifier == y.ReferenceIdentifier && x.ReferenceType == y.ReferenceType)).ToList();
-
-            foreach (var removeReference in removeReferences)
-            {
-                this.tdb.TemplateConstraintReferences.Remove(removeReference);
+            // Remove references that aren't in the save model
+            foreach (var existingReference in existing)
+            {
+                if (references.Any(y => y.ReferenceIdentifier == existingReference.ReferenceIdentifier && y.ReferenceType == existingReference.ReferenceType))
+                    continue;
+
+                this.tdb.TemplateConstraintReferences.Remove(existingReference);
             }
         }


Add a blank line for consistency

Add a blank line for consistency

--- UnitTests/Mono.Debugging.Tests/Shared/EvaluationTests.cs
+++ UnitTests/Mono.Debugging.Tests/Shared/EvaluationTests.cs
@@ -764,6 +764,7 @@
 			}
 			Assert.AreEqual ("5000", val.Value);
 			Assert.AreEqual ("int", val.TypeName);
+
 			val = Eval ("string.Join(\",\", numbers.Where(n=>n.StartsWith(\"t\")).ToArray())");
 			if (!AllowTargetInvokes) {
 				var options = Session.Options.EvaluationOptions.Clone ();


Added encoding to file name before it causes issues

--- WPFSKillTree/ViewModels/Builds/BuildsControlViewModel.cs
+++ WPFSKillTree/ViewModels/Builds/BuildsControlViewModel.cs
@@ -303,7 +303,7 @@
             var dialogSettings = new FileSelectorDialogSettings
             {
                 DefaultPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
-                IsFolderPicker = false,
+                IsFolderPicker = true,
             };
             var path = await _dialogCoordinator.ShowFileSelectorAsync(this,
                 L10n.Message("Select save directory"),
@@ -311,7 +311,7 @@
                 dialogSettings);
             if (path == null)
                 return;
-            path = Path.Combine(path, $"{build.Name}.build");
+            path = Path.Combine(path, $"{SerializationUtils.EncodeFileName(build.Name)}.build");

             byte[] jsonEncodedText = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(build));
             using (FileStream stream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.None, bufferSize: jsonEncodedText.Length, useAsync: true))


Improved command manager wrapper

Improved command manager wrapper

--- src/Catel.MVVM/Catel.MVVM.Shared/MVVM/Commands/CommandManagerWrapper.cs
+++ src/Catel.MVVM/Catel.MVVM.Shared/MVVM/Commands/CommandManagerWrapper.cs
@@ -65,7 +65,11 @@
                 return;
             }

+#if NET
+            View.PreviewKeyDown += OnKeyDown;
+#else
             View.KeyDown += OnKeyDown;
+#endif

             _subscribed = true;
         }
@@ -77,7 +81,11 @@
                 return;
             }

+#if NET
+            View.PreviewKeyDown -= OnKeyDown;
+#else
             View.KeyDown -= OnKeyDown;
+#endif

             _subscribed = false;
         }


Use pattern matching

Use pattern matching

--- src/Features/CSharp/Portable/AddImport/CSharpAddImportFeatureService.cs
+++ src/Features/CSharp/Portable/AddImport/CSharpAddImportFeatureService.cs
@@ -90,8 +90,7 @@
                         return false;
                     }

-                    var method = parent.Expression as MemberAccessExpressionSyntax;
-                    if (method != null)
+                    if (parent.Expression is MemberAccessExpressionSyntax method)
                     {
                         node = method.Name;
                     }
@@ -173,8 +172,7 @@

                 case CS1574:
                 case CS1584:
-                    var cref = node as QualifiedCrefSyntax;
-                    if (cref != null)
+                    if (node is QualifiedCrefSyntax cref)
                     {
                         node = cref.Container;
                     }


updates Jenkins configuration serializer tests

--- src/FlubuCore.Tests/BuildServers/JenkinsConfigurationSerializerTests.cs
+++ src/FlubuCore.Tests/BuildServers/JenkinsConfigurationSerializerTests.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using FlubuCore.BuildServers.Configurations;
 using FlubuCore.BuildServers.Configurations.Models.Jenkins;
 using Xunit;
@@ -59,7 +60,7 @@
                 }
             });

-            Assert.Equal(expectedPipeLine, jenkinsPipeline);
+            Assert.Equal(expectedPipeLine.Replace(Environment.NewLine, string.Empty), jenkinsPipeline.Replace(Environment.NewLine, string.Empty));
         }

         [Fact]
@@ -113,7 +114,7 @@
                 }
             });

-            Assert.Equal(expectedPipeLine, jenkinsPipeline);
+            Assert.Equal(expectedPipeLine.Replace(Environment.NewLine, string.Empty), jenkinsPipeline.Replace(Environment.NewLine, string.Empty));
         }

         [Fact]
@@ -140,7 +141,7 @@
                 }
             });

-            Assert.Equal(expectedPipeLine, jenkinsPipeline);
+            Assert.Equal(expectedPipeLine.Replace(Environment.NewLine, string.Empty), jenkinsPipeline.Replace(Environment.NewLine, string.Empty));
         }

         [Fact]
@@ -176,7 +177,7 @@
                 }
             });

-            Assert.Equal(expectedPipeLine, jenkinsPipeline);
+            Assert.Equal(expectedPipeLine.Replace(Environment.NewLine, string.Empty), jenkinsPipeline.Replace(Environment.NewLine, string.Empty));
         }

         [Fact]
@@ -201,7 +202,7 @@
                }
             });

-            Assert.Equal(expectedPipeLine, jenkinsPipeline);
+            Assert.Equal(expectedPipeLine.Replace(Environment.NewLine, string.Empty), jenkinsPipeline.Replace(Environment.NewLine, string.Empty));
         }

         [Fact]
@@ -259,7 +260,7 @@
                 }
             });

-            Assert.Equal(expectedPipeLine, jenkinsPipeline);
-        }
-    }
-}
+            Assert.Equal(expectedPipeLine.Replace(Environment.NewLine, string.Empty), jenkinsPipeline.Replace(Environment.NewLine, string.Empty));
+        }
+    }
+}


added more includes overrides

added more includes overrides

--- src/Foundatio.Parsers.ElasticQueries/ElasticQueryParserConfiguration.cs
+++ src/Foundatio.Parsers.ElasticQueries/ElasticQueryParserConfiguration.cs
@@ -77,9 +77,12 @@
         }

         public ElasticQueryParserConfiguration UseIncludes<T>(Func<string, Task<string>> includeResolver, int priority = 0) where T : IncludeVisitor, new() {
+            return UseIncludes(new T(), includeResolver, priority);
+        }
+
+        public ElasticQueryParserConfiguration UseIncludes<T>(T visitor, Func<string, Task<string>> includeResolver, int priority = 0) where T : IncludeVisitor {
             IncludeResolver = includeResolver;
-
-            return AddVisitor(new T(), priority);
+            return AddVisitor(visitor, priority);
         }

         public ElasticQueryParserConfiguration UseIncludes(Func<string, Task<string>> includeResolver, int priority = 0) {


If we can't create an IConnection - return null

svn path=/trunk/bitsharp/; revision=98746

--- src/MonoTorrent/MonoTorrent.Client/PeerConnections/ConnectionFactory.cs
+++ src/MonoTorrent/MonoTorrent.Client/PeerConnections/ConnectionFactory.cs
@@ -37,7 +37,14 @@
                 if (!trackerTypes.TryGetValue(connectionUri.Scheme, out type))
                     return null;

-            return (IConnection)Activator.CreateInstance(type, connectionUri);
+            try
+            {
+                return (IConnection)Activator.CreateInstance(type, connectionUri);
+            }
+            catch
+            {
+                return null;
+            }
         }
     }
 }


Added method 'WaitElement' with timespan parameter

--- src/SeleniumWebdriverHelpers/SeleniumWebdriverHelpers/WaitExtensions.cs
+++ src/SeleniumWebdriverHelpers/SeleniumWebdriverHelpers/WaitExtensions.cs
@@ -24,6 +24,11 @@
             Wait(browser, locator, TimeSpan.FromMinutes(1));
         }

+        public static void WaitElement(this IWebDriver browser, By locator, TimeSpan timeSpan)
+        {
+            Wait(browser, locator, timeSpan);
+        }
+
         private static void Wait(IWebDriver browser, By locator, TimeSpan timespan)
         {
             IWait<IWebDriver> wait = new WebDriverWait(browser, timespan);


CIT-134 updated url in javascript

CIT-134 updated url in javascript

--- Cats.Web.Hub/Views/DispatchAllocation/Index.cshtml
+++ Cats.Web.Hub/Views/DispatchAllocation/Index.cshtml
@@ -138,11 +138,11 @@
         });

         function populateRequistions() {
-            var url = '/DispatchAllocation/AvailableRequistions?UnCommited=';
+            var url = '@Url.Action("AvailableRequistions", "DispatchAllocation", new { UnCommited = "__id__" })';///DispatchAllocation/AvailableRequistions?UnCommited=';
             if ($('#chk-uncommited').attr('checked') == 'checked') {
-                url += 'true';
-            } else {
-                url += 'false';
+               url= url.replace("__id__","true") ;
+            } else {
+                url = url.replace("__id__", "false");
             }
             $.getJSON(url, function (result) {
                 var req = $('#Requisitions');
@@ -164,18 +164,21 @@
             var req = $('#Requisitions :selected');

             // load the header
-            $('#selection-header').load("/DispatchAllocation/SelectionHeader?requisition="+req.text() );
+            var hurl = '@Url.Action("SelectionHeader","DispatchAllocation",new {requisition="__id__"})';
+            $('#selection-header').load(hurl.replace("__id__",req.text()));//"/DispatchAllocation/SelectionHeader?requisition="+req.text() );

             // Load available SIs
-            $('#si-balance').load('/DispatchAllocation/SiBalances?requisition=' + req.text());
+            var surl = '@Url.Action("SiBalances","DispatchAllocation",new {requisition="__id__"})';
+            $('#si-balance').load(surl.replace("__id__",req.text()));//'/DispatchAllocation/SiBalances?requisition=' + req.text());

             // Clear out the balance view
             $('#balance-view').html('');

             // Disable the commit button until the Project code with balance is selected.
-
-            $.getJSON('/DispatchAllocation/GetCommodities/', { RequisitionNo: req.text() }, function (coms) {
-                var c = coms;
+            var curl = '@Url.Action("GetCommodities","DispatchAllocation")';
+            //$.getJSON('/DispatchAllocation/GetCommodities/', { RequisitionNo: req.text() }, function (coms) {
+            $.getJSON(curl, { RequisitionNo: req.text() }, function (coms) {
+            var c = coms;
                 var commodity = $('#CommodityID-Selector').data('tComboBox');
                 commodity.dataBind(coms);
                 if (coms.length > 0) {
@@ -249,16 +252,18 @@
                 params["Uncommited"] = true;
             } else {
             params["Uncommited"] = false;
-        }
-            $('#alloc-grid').load('/DispatchAllocation/GetAllocations/', params);
+            }
+            var aurl = '@Url.Action("GetAllocations","DispatchAllocation")';
+            $('#alloc-grid').load(aurl,params);//'/DispatchAllocation/GetAllocations/', params);
         }

         function onCommodityChange(e) {
             // Reload the grid
             reloadGrid();
             // reload possible SI numbers for the selected commodities
-           var commodity = $('#CommodityID-Selector').data('tComboBox');
-            $.getJSON('/DispatchAllocation/GetAvailableSINumbers/', { CommodityID: commodity.value() }, onSINumbersLoaded);
+            var commodity = $('#CommodityID-Selector').data('tComboBox');
+            var asurl = '@Url.Action("GetAvailableSINumbers","DispatchAllocation")';
+            $.getJSON(asurl, { CommodityID: commodity.value() }, onSINumbersLoaded);
         }

         function onSINumbersLoaded(result) {


WinForms example use args.IsLoading rather than !args.CanReload

--- CefSharp.WinForms.Example/BrowserTabUserControl.cs
+++ CefSharp.WinForms.Example/BrowserTabUserControl.cs
@@ -126,7 +126,7 @@
             SetCanGoBack(args.CanGoBack);
             SetCanGoForward(args.CanGoForward);

-            this.InvokeOnUiThreadIfRequired(() => SetIsLoading(!args.CanReload));
+            this.InvokeOnUiThreadIfRequired(() => SetIsLoading(args.IsLoading));
         }

         private void OnBrowserTitleChanged(object sender, TitleChangedEventArgs args)


Fix buils error

Fix buils error

--- Common/src/HetsData/Helpers/RentalRequestHelper.cs
+++ Common/src/HetsData/Helpers/RentalRequestHelper.cs
@@ -2,7 +2,6 @@
 using System.Collections.Generic;
 using System.Linq;
 using HetsData.Model;
-using Microsoft.AspNetCore.Mvc;
 using Microsoft.EntityFrameworkCore;
 using Microsoft.Extensions.Configuration;


estilo a btn categoria_index

estilo a btn categoria_index

--- LaTuerca/Views/Categorias/Index.cshtml
+++ LaTuerca/Views/Categorias/Index.cshtml
@@ -1,55 +1,41 @@
 @model IEnumerable<LaTuerca.Models.Categoria>
+@using LaTuerca.Controllers
+@{
+    EmpresasController empresa = new EmpresasController();
+    ViewBag.NombreEmpresa = empresa.getNombreEmpresa();
+}

 @{
     ViewBag.Title = "Categoria";
 }
-
-

-

-         @ViewBag.Title
-

-

-
  @ViewBag.Title

-

-

-
+@if (TempData["notice"] != null)
+{
+

+

+               @TempData["notice"]
+

+

+}

-        @if (!Html.ViewData.ModelState.IsValid)
-        {
-

-

-                    @Html.ValidationSummary()
-

-

-        }

-

-
-                             Nuevo
+

+
+                        @ViewBag.NombreEmpresa
+                        @ViewBag.Title
+

+

+
+

-

-

-                        <button type="button" class="btn btn-box-tool" data-widget="collapse">
-
-                        </button>
-

-                            <button type="button" class="btn btn-box-tool dropdown-toggle" data-toggle="dropdown">
-
-                            </button>
-

-
Action

-
Another action

-
Something else here

-

-
Separated link

-

-

-                        <button type="button" class="btn btn-box-tool" data-widget="remove"></button>
-

-

+
+                             Nuevo Categoria
+
+

+

+


add failing tests for PathGeometry.ToString()


[v4.1.0] Lib.Web.Mvc

[v4.1.0] Lib.Web.Mvc

--- Lib.Web.Mvc/Properties/AssemblyInfo.cs
+++ Lib.Web.Mvc/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.0.0.0")]
-[assembly: AssemblyFileVersion("4.0.0.0")]
+[assembly: AssemblyVersion("4.1.0.0")]
+[assembly: AssemblyFileVersion("4.1.0.0")]


Add option to overwrite the TableName for TypedStatement

--- src/SimpleStack.Orm/Expressions/Statements/Typed/TypedWhereStatement.cs
+++ src/SimpleStack.Orm/Expressions/Statements/Typed/TypedWhereStatement.cs
@@ -26,7 +26,18 @@
         {
             return new TableWhereExpresionVisitor<T>(_dialectProvider, WhereStatement.Parameters, _modelDefinition);
         }
-
+
+        /// <summary>
+        /// Used to overwrite the tablename generated from the Typed parameter
+        /// </summary>
+        /// <param name="tableName">The new table name</param>
+        /// <returns></returns>
+        public virtual TypedWhereStatement<T> From(string tableName)
+        {
+            WhereStatement.TableName = _dialectProvider.GetQuotedTableName(tableName);
+            return this;
+        }
+
         public virtual TypedWhereStatement<T> Clear()
         {
             WhereStatement.Clear();


Fix equality comparison of WeakReferences

Serialization of a WeakReference is dubious at best, as when it's deserialized, there won't be any strong references to the deserialized object it wraps, such that it's then immediately available for GC and will likely be gone by the time we go to look at it.

--- src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs
+++ src/System.Runtime.Serialization.Formatters/tests/EqualityExtensions.cs
@@ -15,10 +15,19 @@
     {
         public static bool IsEqual(this WeakReference @this, WeakReference other)
         {
-            return @this != null &&
-                other != null &&
-                @this.TrackResurrection == other.TrackResurrection &&
-                Object.Equals(@this.Target, other.Target);
+            if (@this == null || other == null)
+                return false;
+
+            if (@this.TrackResurrection != other.TrackResurrection)
+                return false;
+
+            // When WeakReference is deserialized, the object it wraps may blip into and out of
+            // existence before we get a chance to compare it, since there are no strong references
+            // to it such that it can then be immediately collected.  Therefore, if we can get both
+            // values, great, compare them.  Otherwise, consider them equal.
+            object a = @this.Target;
+            object b = other.Target;
+            return a != null && b != null ? Equals(a, b) : true;
         }

         public static bool IsEqual<T>(this WeakReference<T> @this, WeakReference<T> other)
@@ -27,12 +36,13 @@
             if (@this == null || other == null)
                 return false;

-            if (@this.TryGetTarget(out T thisTarget) && other.TryGetTarget(out T otherTarget))
-            {
-                return Object.Equals(thisTarget, otherTarget);
-            }
-
-            return false;
+            // When WeakReference is deserialized, the object it wraps may blip into and out of
+            // existence before we get a chance to compare it, since there are no strong references
+            // to it such that it can then be immediately collected.  Therefore, if we can get both
+            // values, great, compare them.  Otherwise, consider them equal.
+            return @this.TryGetTarget(out T thisTarget) && other.TryGetTarget(out T otherTarget) ?
+                Equals(thisTarget, otherTarget) :
+                true;
         }

         public static bool IsEqual<T>(this Lazy<T> @this, Lazy<T> other)


New generic type for identifiers

New generic type for identifiers

CollectionJsonController can now take a new generic parameter to use for
identifiers.

--- src/WebApiContrib.Formatting.CollectionJson/CollectionJsonController.cs
+++ src/WebApiContrib.Formatting.CollectionJson/CollectionJsonController.cs
@@ -8,7 +8,15 @@

 namespace WebApiContrib.Formatting.CollectionJson
 {
-    public abstract class CollectionJsonController<TData> : ApiController
+    public abstract class CollectionJsonController<TData> : CollectionJsonController<TData,int>
+    {
+        protected CollectionJsonController(ICollectionJsonDocumentWriter<TData> writer, ICollectionJsonDocumentReader<TData> reader, string routeName = "DefaultApi") :
+            base(writer, reader, routeName)
+        {
+        }
+    }
+
+    public abstract class CollectionJsonController<TData,TId> : ApiController
     {
         private CollectionJsonFormatter formatter = new CollectionJsonFormatter();
         private string routeName;
@@ -47,7 +55,7 @@
             return response;
         }

-        public HttpResponseMessage Get(int id)
+        public HttpResponseMessage Get(TId id)
         {
             var response = new HttpResponseMessage();
             var data = this.Read(id, response);
@@ -63,7 +71,7 @@
             return response;
         }

-        public HttpResponseMessage Put(int id, WriteDocument document)
+        public HttpResponseMessage Put(TId id, WriteDocument document)
         {
             var response = new HttpResponseMessage();
             var data = this.Update(id, reader.Read(document), response);
@@ -72,7 +80,7 @@
         }

         [AcceptVerbs("DELETE")]
-        public HttpResponseMessage Remove(int id)
+        public HttpResponseMessage Remove(TId id)
         {
             var response = new HttpResponseMessage();
             Delete(id, response);
@@ -84,7 +92,7 @@
             throw new HttpResponseException(System.Net.HttpStatusCode.NotImplemented);
         }

-        protected virtual TData Read(int id, HttpResponseMessage response)
+        protected virtual TData Read(TId id, HttpResponseMessage response)
         {
             throw new HttpResponseException(System.Net.HttpStatusCode.NotImplemented);
         }
@@ -94,11 +102,12 @@
             throw new HttpResponseException(System.Net.HttpStatusCode.NotImplemented);
         }

-        protected virtual TData Update(int id, TData data, HttpResponseMessage response) {
+        protected virtual TData Update(TId id, TData data, HttpResponseMessage response)
+        {
             throw new HttpResponseException(System.Net.HttpStatusCode.NotImplemented);
         }

-        protected virtual void Delete(int id, HttpResponseMessage response)
+        protected virtual void Delete(TId id, HttpResponseMessage response)
         {
             throw new HttpResponseException(System.Net.HttpStatusCode.NotImplemented);
         }


hello world

hello world

--- ConsoleApplication1/ConsoleApplication1/Program.cs
+++ ConsoleApplication1/ConsoleApplication1/Program.cs
@@ -10,6 +10,8 @@
     {
         static void Main(string[] args)
         {
+            string blah = "Hello World";
+            System.Console.Out.WriteLine(blah)
         }
     }
 }


Add server button now inside scroll area

--- LmpClient/Windows/Connection/ConnectionDrawer.cs
+++ LmpClient/Windows/Connection/ConnectionDrawer.cs
@@ -29,15 +29,15 @@
             GUILayout.Label(LocalizationContainer.ConnectionWindowText.CustomServers);
             GUILayout.BeginVertical();

+            ScrollPos = GUILayout.BeginScrollView(ScrollPos, GUILayout.Width(WindowWidth - 5),
+                GUILayout.Height(WindowHeight - 100));
+
             if (GUILayout.Button(PlusIcon))
             {
                 SettingsSystem.CurrentSettings.Servers.Insert(0, new ServerEntry());
                 SettingsSystem.SaveSettings();
             }
-            GUILayout.Space(15);
-
-            ScrollPos = GUILayout.BeginScrollView(ScrollPos, GUILayout.Width(WindowWidth - 5),
-                GUILayout.Height(WindowHeight - 100));
+
             for (var serverPos = 0; serverPos < SettingsSystem.CurrentSettings.Servers.Count; serverPos++)
             {
                 GUILayout.BeginHorizontal();


receiver code clean up

receiver code clean up

Former-commit-id: 85ebfc311280ed026eb4a31c6fcdbafdfe2b9fd6

--- MassTransit.ServiceBus.NMS/NmsMessageReceiver.cs
+++ MassTransit.ServiceBus.NMS/NmsMessageReceiver.cs
@@ -19,6 +19,7 @@
     using Apache.NMS.ActiveMQ;
     using Exceptions;
     using Internal;
+    using log4net;
     using IMessageConsumer=Apache.NMS.IMessageConsumer;

     public class NmsMessageReceiver :
@@ -32,6 +33,9 @@
         private ISession _session;
         private IDestination _destination;
         private IMessageConsumer _messageConsumer;
+
+        private static readonly ILog _log = LogManager.GetLogger(typeof(NmsMessageSender));
+        private static readonly ILog _messageLog = LogManager.GetLogger("MassTransit.Messages");

         public NmsMessageReceiver(IEndpoint endpoint)
         {
@@ -75,8 +79,8 @@
         {
             try
             {
-//				if (_log.IsDebugEnabled)
-//					_log.DebugFormat("Queue: {0} Received Message Id {1}", _queue.Path, msg.Id);
+				if (_log.IsDebugEnabled)
+					_log.DebugFormat("Queue: {0} Received Message Id {1}", _queueName, message.NMSMessageId);

                 if (_consumer != null)
                 {
@@ -86,21 +90,24 @@

                         if (_consumer.IsHandled(e))
                         {
-                            //if (_messageLog.IsInfoEnabled)
-                            //			_messageLog.InfoFormat("Received message {0} from {1}", e.Messages[0].GetType(), e.ReturnEndpoint.Uri);
+                            if (_messageLog.IsInfoEnabled)
+                            			_messageLog.InfoFormat("Received message {0} from {1}", e.Messages[0].GetType(), e.ReturnEndpoint.Uri);

                             ThreadPool.QueueUserWorkItem(ProcessMessage, e);
                         }
                     }
                     catch (SerializationException ex)
                     {
-                        //_log.Error("Discarding unknown message " + message.NMSMessageId, ex);
+                        if(_log.IsErrorEnabled)
+                            _log.Error("Discarding unknown message " + message.NMSMessageId, ex);
                         throw;
                     }
                 }
             }
             catch (Exception ex)
             {
+                if (_log.IsErrorEnabled)
+                    _log.Error("Discarding unknown message " + message.NMSMessageId, ex);
                 throw;
             }
         }
@@ -118,8 +125,8 @@
             }
             catch (Exception ex)
             {
-                //if (_log.IsErrorEnabled)
-//_log.Error(string.Format("An exception occured delivering envelope {0}", e.Id), ex);
+                if (_log.IsErrorEnabled)
+                    _log.Error(string.Format("An exception occured delivering envelope {0}", e.Id), ex);
             }
         }


fix missleading FileMode refer to http://rubyforge.org/tracker/index.php?func=detail&aid=25116&group_id=4359&atid=16798

--- Merlin/Main/Languages/Ruby/Ruby/Builtins/File.cs
+++ Merlin/Main/Languages/Ruby/Ruby/Builtins/File.cs
@@ -62,8 +62,8 @@
                 fileMode = FileMode.Open;
             }

-            if ((mode & RubyFileMode.EXCL) != 0) {
-                share = FileShare.None;
+            if ((mode & RubyFileMode.EXCL) != 0 && (mode & RubyFileMode.CREAT) != 0 && context.DomainManager.Platform.FileExists(path)) {
+                throw RubyExceptions.CreateIOError((String.Format("File exists - {0}", path)));
             }

             return context.DomainManager.Platform.OpenInputFileStream(path, fileMode, access, share);


Fix zoom option label overlapping the slider

--- Core/Other/Settings/TabSettingsGeneral.Designer.cs
+++ Core/Other/Settings/TabSettingsGeneral.Designer.cs
@@ -123,7 +123,7 @@
             // labelZoomValue
             //
             this.labelZoomValue.BackColor = System.Drawing.Color.Transparent;
-            this.labelZoomValue.Location = new System.Drawing.Point(141, 123);
+            this.labelZoomValue.Location = new System.Drawing.Point(147, 123);
             this.labelZoomValue.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
             this.labelZoomValue.Name = "labelZoomValue";
             this.labelZoomValue.Size = new System.Drawing.Size(38, 13);


git-svn-id: https://jumony.svn.codeplex.com/svn/trunk@79670 2327b42d-5241-43d6-9e2a-de5ac946f064

--- Ivony.Html.Web/HtmlProviders.cs
+++ Ivony.Html.Web/HtmlProviders.cs
@@ -254,8 +254,7 @@
     /// 分析 HTML 文档，此方法会根据情况缓存文档模型
     /// </summary>
     /// <param name="context">当前请求的 HttpContext 对象</param>
-    /// <param name="virtualPath">请求的虚拟路径</param>
-    /// <param name="result">文档加载结果</param>
+    /// <param name="contentResult">文档加载结果</param>
     /// <returns>HTML 文档对象</returns>
     public static IHtmlDocument ParseDocument( HttpContextBase context, HtmlContentResult contentResult )
     {
@@ -279,7 +278,11 @@
         var createDocument = Cache.Get( cacheKey ) as Func<IHtmlDomProvider, IHtmlDocument>;

         if ( createDocument != null )
-          return createDocument( result.DomProvider );
+        {
+          var provider = result.DomProvider;
+          Trace.Write( "Test", "Begin Invoke DynamicMethod" );
+          return createDocument( provider );
+        }

         Trace.Write( "Jumony for ASP.NET", "Document cache missed" );

@@ -289,6 +292,7 @@
         var document = ParseDocument( result, contentResult.Content, contentResult.ContentUri );

         createDocument = document.Compile();
+        new Action( delegate { createDocument( result.DomProvider ); } ).BeginInvoke( null, null );//立即在新线程预热此方法

         Cache.Insert( cacheKey, createDocument, new CacheDependency( new string[0], new[] { key } ) );