Fixed signtool error if outpath contains blanks.

--- src/Update/Program.cs
+++ src/Update/Program.cs
@@ -555,7 +555,7 @@
             }

             Tuple<int, string> processResult = await Utility.InvokeProcessAsync(exe,
-                String.Format("sign {0} {1}", signingOpts, exePath), CancellationToken.None);
+                String.Format("sign {0} \"{1}\"", signingOpts, exePath), CancellationToken.None);

             if (processResult.Item1 != 0) {
                 var msg = String.Format(


Fix Either operations that have the wrong type and implementation. Issue #3

--- src/XSharpx/Either.cs
+++ src/XSharpx/Either.cs
@@ -54,17 +54,17 @@
       return IsLeft ? o() : this;
     }

-    public bool All(Func<A, bool> f) {
-      return IsLeft || f(a);
-    }
-
-    public bool Any(Func<A, bool> f) {
-      return IsRight && f(a);
-    }
-
-    public List<A> ToList {
-      get {
-        return IsLeft ? List<A>.Empty : a.ListValue();
+    public bool All(Func<B, bool> f) {
+      return IsLeft || f(b);
+    }
+
+    public bool Any(Func<B, bool> f) {
+      return IsRight && f(b);
+    }
+
+    public List<B> ToList {
+      get {
+        return IsLeft ? List<B>.Empty : b.ListValue();
       }
     }


Now only run algo when one of the algo's fields is updated.

--- src/algo/Algorithm.cs
+++ src/algo/Algorithm.cs
@@ -12,8 +12,13 @@
     protected abstract void run(DataRecord.DataRecord incoming);

     public void process(ref DataRecord.DataRecord incoming){
+      bool runme = false;
       try{
-        this.run(incoming);
+        foreach (string field in requiredDataFields){
+          if (incoming.updated_fields.Contains(field))
+              runme = true;
+        }
+        if (runme) this.run(incoming);
       } catch (Exception ex){ throw ex;}
       incoming.addData(data);
     }


Put resend delay back to 2 seconds (I had changed it to 5)

git-svn-id: c32cf1ecefca26b8770d7b0740bc0c5c174087e4@509 c754d5e9-d413-0410-bcdf-9574c9dba6b7


Bump version

Bump version

--- BARABAS.cs
+++ BARABAS.cs
@@ -1,5 +1,5 @@
 /*
- * BARABAS v1.5beta1
+ * BARABAS v1.5beta2
  *
  * (Burillo's Automatic Resource Administration for BAses and Ships)
  *
@@ -496,6 +496,7 @@
     }
     return false;
   }
+
   // get all grids that are local to source grid (i.e. all grids connected by
   // rotors or pistons)
   public List<IMyCubeGrid> getLocalGrids(IMyCubeGrid src) {


fix /cam_select and writeline stuff

fix /cam_select and writeline stuff

--- CompressedImageView/MainWindow.xaml.cs
+++ CompressedImageView/MainWindow.xaml.cs
@@ -92,7 +92,7 @@
             EStop.startListening(nh);

             velPub = nh.advertise<gm.Twist>("/cmd_vel", 1);
-            multiplexPub = nh.advertise<m.Byte>("/camera_select", 1);
+            multiplexPub = nh.advertise<m.Byte>("/cam_select", 1);

             new Thread(() =>
             {
@@ -193,6 +193,7 @@
         {
             if (multiplexPub == null) return;
             m.Byte msg = new m.Byte { data = (byte)(maincameramask | secondcameramask) };
+            Console.WriteLine("SENDING CAM SELECT: " + msg.data);
             multiplexPub.publish(msg);
         }


Correct some typos

Correct some typos

--- Configuration/TFSAggregatorSettings.cs
+++ Configuration/TFSAggregatorSettings.cs
@@ -39,7 +39,7 @@
         /// <summary>
         /// Parse the specified <see cref="XDocument"/> to build a <see cref="TFSAggregatorSettings"/> instance.
         /// </summary>
-        /// <param name="lastWriteTime">Last teime the document has been changed.</param>
+        /// <param name="lastWriteTime">Last time the document has been changed.</param>
         /// <param name="load">A lambda returning the <see cref="XDocument"/> to parse.</param>
         /// <returns></returns>
         public static TFSAggregatorSettings Load(DateTime lastWriteTime, Func<LoadOptions, XDocument> load, ILogEvents logger)


UI/SpeechBubble: check deletion before doing things, plz (#5811)

--- Content.Client/Chat/UI/SpeechBubble.cs
+++ Content.Client/Chat/UI/SpeechBubble.cs
@@ -90,34 +90,6 @@
             base.FrameUpdate(args);

             _timeLeft -= args.DeltaSeconds;
-
-            // Lerp to our new vertical offset if it's been modified.
-            if (MathHelper.CloseToPercent(_verticalOffsetAchieved - VerticalOffset, 0, 0.1))
-            {
-                _verticalOffsetAchieved = VerticalOffset;
-            }
-            else
-            {
-                _verticalOffsetAchieved = MathHelper.Lerp(_verticalOffsetAchieved, VerticalOffset, 10 * args.DeltaSeconds);
-            }
-
-            if (!_entityManager.GetComponent<TransformComponent>(_senderEntity).Coordinates.IsValid(_entityManager))
-            {
-                Modulate = Color.White.WithAlpha(0);
-                return;
-            }
-
-            if (_timeLeft <= FadeTime)
-            {
-                // Update alpha if we're fading.
-                Modulate = Color.White.WithAlpha(_timeLeft / FadeTime);
-            }
-            else
-            {
-                // Make opaque otherwise, because it might have been hidden before
-                Modulate = Color.White;
-            }
-
             if (_entityManager.Deleted(_senderEntity) || _timeLeft <= 0)
             {
                 // Timer spawn to prevent concurrent modification exception.
@@ -125,7 +97,36 @@
                 return;
             }

-            var worldPos = _entityManager.GetComponent<TransformComponent>(_senderEntity).WorldPosition;
+            // Lerp to our new vertical offset if it's been modified.
+            if (MathHelper.CloseToPercent(_verticalOffsetAchieved - VerticalOffset, 0, 0.1))
+            {
+                _verticalOffsetAchieved = VerticalOffset;
+            }
+            else
+            {
+                _verticalOffsetAchieved = MathHelper.Lerp(_verticalOffsetAchieved, VerticalOffset, 10 * args.DeltaSeconds);
+            }
+
+            if (!_entityManager.TryGetComponent<TransformComponent>(_senderEntity, out var xform)
+                    || !xform.Coordinates.IsValid(_entityManager))
+            {
+                Modulate = Color.White.WithAlpha(0);
+                return;
+            }
+
+            if (_timeLeft <= FadeTime)
+            {
+                // Update alpha if we're fading.
+                Modulate = Color.White.WithAlpha(_timeLeft / FadeTime);
+            }
+            else
+            {
+                // Make opaque otherwise, because it might have been hidden before
+                Modulate = Color.White;
+            }
+
+
+            var worldPos = xform.WorldPosition;
             var scale = _eyeManager.MainViewport.GetRenderScale();
             var offset = new Vector2(0, EntityVerticalOffset * EyeManager.PixelsPerMeter * scale);
             var lowerCenter = (_eyeManager.WorldToScreen(worldPos) - offset) / UIScale;


Implement evaluation of lambda functions

--- squirrel/Evaluator.cs
+++ squirrel/Evaluator.cs
@@ -89,7 +89,7 @@

             if (head.GetType() == typeof(LambdaFunctionNode))
             {
-                throw new NotImplementedException("evaluation of lambda functions is not implemented yet");
+                return EvaluateLambdaFunction((LambdaFunctionNode) head, tail, new Environment(env));
             }

             throw new ArgumentException("first element of symbolic expression must be a symbol or lambda function");
@@ -138,6 +138,26 @@
             }

             return function.Invoke(tail, env);
+        }
+
+        private static INode EvaluateLambdaFunction(LambdaFunctionNode head, List<INode> tail, Environment env)
+        {
+            var expectedCount = head.Parameters.Children.Count;
+            var actualCount = tail.Count;
+
+            if (actualCount != expectedCount)
+            {
+                return new ErrorNode($"function takes exactly {expectedCount} arguments ({actualCount} given)");
+            }
+
+            for (var i = 0; i < expectedCount; i++)
+            {
+                var key = ((SymbolNode) head.Parameters.Children[i]).Value;
+                var value = tail[i];
+                env.Put(key, value);
+            }
+
+            return BuiltinEval(new List<INode>() {head.Body}, env);
         }

         private static INode BuiltinBlock(List<INode> args, Environment env) => args[args.Count - 1];


Safer Url mapping

Safer Url mapping

--- DragonSpark.Identity.Twitter/Claims/WebsiteClaimAction.cs
+++ DragonSpark.Identity.Twitter/Claims/WebsiteClaimAction.cs
@@ -1,5 +1,7 @@
 using DragonSpark.Application.Security.Identity.Claims.Actions;
+using DragonSpark.Model.Selection;
 using Microsoft.AspNetCore.Authentication;
+using System.Text.Json;

 namespace DragonSpark.Identity.Twitter.Claims
 {
@@ -7,9 +9,24 @@
 	{
 		public static WebsiteClaimAction Default { get; } = new WebsiteClaimAction();

-		WebsiteClaimAction() : base(Website.Default, "url", root => root.GetProperty("entities")
-		                                                                .GetProperty("url")
-		                                                                .GetProperty("urls")[0]
-		                                                                .GetString("expanded_url")!) {}
+		WebsiteClaimAction() : base(Website.Default, "url", GetUrl.Instance.Get!) {}
+
+		sealed class GetUrl : ISelect<JsonElement, string?>
+		{
+			public static GetUrl Instance { get; } = new();
+
+			GetUrl() {}
+
+			public string? Get(JsonElement parameter)
+			{
+				var entities = parameter.GetProperty("entities");
+				if (entities.TryGetProperty("url", out entities) && entities.TryGetProperty("urls", out var urls))
+				{
+					return urls[0].GetString("expanded_url");
+				}
+				return null;
+			}
+		}
+
 	}
 }


fix: No leading slash for Tardigrade-Paths

--- Duplicati.Library.Backend.Tardigrade/TardigradeBackend.cs
+++ Duplicati.Library.Backend.Tardigrade/TardigradeBackend.cs
@@ -308,9 +308,9 @@
         private string GetBasePath()
         {
             if (!string.IsNullOrEmpty(_folder))
-                return "/" + _folder + "/";
+                return _folder + "/";
             else
-                return "/";
+                return "";
         }

         /// <summary>


Ensure exported actions file contains UTF16LE BOM

--- EarTrumpet.Actions/ViewModel/ImportExportPageViewModel.cs
+++ EarTrumpet.Actions/ViewModel/ImportExportPageViewModel.cs
@@ -3,6 +3,7 @@
 using System;
 using System.Diagnostics;
 using System.IO;
+using System.Text;
 using System.Windows.Input;

 namespace EarTrumpet_Actions.ViewModel
@@ -56,7 +57,7 @@
             {
                 try
                 {
-                    File.WriteAllText(dlg.FileName, Addon.Current.Export());
+                    File.WriteAllText(dlg.FileName, Addon.Current.Export(), Encoding.Unicode);
                 }
                 catch (Exception ex)
                 {


Fix formatting for status label text when earning EXP

--- EndlessClient/Subscribers/MainCharacterEventSubscriber.cs
+++ EndlessClient/Subscribers/MainCharacterEventSubscriber.cs
@@ -34,7 +34,7 @@
         {
             _statusLabelSetter.SetStatusLabel(EOResourceID.STATUS_LABEL_TYPE_INFORMATION,
                                               EOResourceID.STATUS_LABEL_YOU_GAINED_EXP,
-                $"{expDifference} EXP");
+                $" {expDifference} EXP");

             var youGained = _localizedStringFinder.GetString(EOResourceID.STATUS_LABEL_YOU_GAINED_EXP);
             var message = $"{youGained} {expDifference} EXP";


Namespace change.

Namespace change.

--- ExRam.Gremlinq.Core.AspNet/ServiceCollectionExtensions.cs
+++ ExRam.Gremlinq.Core.AspNet/ServiceCollectionExtensions.cs
@@ -1,11 +1,12 @@
 using System;
 using System.Collections.Generic;
+using ExRam.Gremlinq.Core;
+using ExRam.Gremlinq.Core.AspNet;
 using Microsoft.Extensions.Configuration;
-using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Logging;
 using static ExRam.Gremlinq.Core.GremlinQuerySource;

-namespace ExRam.Gremlinq.Core.AspNet
+namespace Microsoft.Extensions.DependencyInjection
 {
     public static class ServiceCollectionExtensions
     {


Implement EmailAddress Mapping for Exchange contacts (type "EX")


Bugfix PublishedContentTypeFactory

Bugfix PublishedContentTypeFactory

--- src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs
+++ src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs
@@ -70,9 +70,7 @@
                 if (_publishedDataTypes == null)
                 {
                     var dataTypes = _dataTypeService.GetAll();
-                    _publishedDataTypes = dataTypes.ToDictionary(
-                        x => x.Id,
-                        x => new PublishedDataType(x.Id, x.EditorAlias, x is DataType d ? d.GetLazyConfiguration() : new Lazy<object>(() => x.Configuration)));
+                    _publishedDataTypes = dataTypes.ToDictionary(x => x.Id, CreatePublishedDataType);
                 }

                 publishedDataTypes = _publishedDataTypes;
@@ -89,12 +87,12 @@
         {
             lock (_publishedDataTypesLocker)
             {
-                foreach (var id in ids)
-                    _publishedDataTypes.Remove(id);
                 var dataTypes = _dataTypeService.GetAll(ids);
-                foreach (var dataType in dataTypes)
-                    _publishedDataTypes[dataType.Id] = new PublishedDataType(dataType.Id, dataType.EditorAlias, dataType is DataType d ? d.GetLazyConfiguration() : new Lazy<object>(() => dataType.Configuration));
+                _publishedDataTypes = dataTypes.ToDictionary(x => x.Id, CreatePublishedDataType);
             }
         }
+
+        private PublishedDataType CreatePublishedDataType(IDataType dataType)
+            => new PublishedDataType(dataType.Id, dataType.EditorAlias, dataType is DataType d ? d.GetLazyConfiguration() : new Lazy<object>(() => dataType.Configuration));
     }
 }


Missing Contract.Requires

Missing Contract.Requires

--- Frontenac/Blueprints/Util/IO/GraphJson/GraphJsonWriter.cs
+++ Frontenac/Blueprints/Util/IO/GraphJson/GraphJsonWriter.cs
@@ -102,6 +102,7 @@
         private static JObject JsonFromElement(IElement element, GraphJsonSettings settings)
         {
             Contract.Requires(element != null);
+            Contract.Requires(settings != null);
             Contract.Ensures(Contract.Result<JObject>() != null);

             var isEdge = element is IEdge;


Rewrite IsAliasReplaceableExpression as iterative instead of recursive

--- src/Workspaces/CSharp/Portable/Extensions/ExpressionSyntaxExtensions.cs
+++ src/Workspaces/CSharp/Portable/Extensions/ExpressionSyntaxExtensions.cs
@@ -1092,6 +1092,11 @@

         private static bool IsAliasReplaceableExpression(ExpressionSyntax expression)
         {
+            while (expression.IsKind(SyntaxKind.SimpleMemberAccessExpression, out MemberAccessExpressionSyntax currentMember))
+            {
+                expression = currentMember.Expression;
+            }
+
             if (expression.Kind() == SyntaxKind.IdentifierName ||
                 expression.Kind() == SyntaxKind.QualifiedName ||
                 expression.Kind() == SyntaxKind.AliasQualifiedName ||
@@ -1099,9 +1104,6 @@
             {
                 return true;
             }
-
-            if (expression.IsKind(SyntaxKind.SimpleMemberAccessExpression, out MemberAccessExpressionSyntax memberAccess))
-                return IsAliasReplaceableExpression(memberAccess.Expression);

             return false;
         }


Add header comments to SQLDataSource

Add header comments to SQLDataSource


finished: layout with flow

finished: layout with flow

--- GraphLayout/MSAGL/Layout/LargeGraphLayout/LgInteractor.cs
+++ GraphLayout/MSAGL/Layout/LargeGraphLayout/LgInteractor.cs
@@ -260,6 +260,8 @@

         private static void ComputePathSimplification(Tiling g, Stopwatch stopwatch, List<Tiling> graphs)
         {
+            Dictionary<int,int> cycle = new Dictionary<int, int>();
+
             Console.WriteLine("Starting Path Simplicfication");
             stopwatch.Start();
             foreach (Tiling graph in graphs)
@@ -277,6 +279,7 @@
                     //find the one end of the path
                     int currentVertexId = w;
                     int oldVertexId = -1;
+                    cycle.Add(w,1);
                     while (graph.DegList[currentVertexId] == 2 && currentVertexId >= g.N)
                     {
                         int neighbor1 = graph.EList[currentVertexId, 0].NodeId;
@@ -293,7 +296,14 @@
                             oldVertexId = currentVertexId;
                             currentVertexId = neighbor2;
                         }
+                        if (cycle.ContainsKey(currentVertexId))
+                        {
+                            cycle.Clear();
+                            break;
+                        }
+                        cycle.Add(currentVertexId, 1);
                     }
+                    if (cycle.Count == 0) continue;

                     //find the path from this end
                     var tempId = oldVertexId;


Recommit pragma disable

Recommit pragma disable

svn path=/trunk/banshee/; revision=4846

--- Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
+++ Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
@@ -299,6 +299,8 @@
             }
         }

+        #pragma warning disable 0169
+
         private bool GetEventCell<G> (int x, int y, out G icell, out Column column, out int row_index) where G : class
         {
             icell = null;
@@ -332,6 +334,8 @@
             cell.BindListItem (model[row_index]);
             return true;
         }
+
+        #pragma warning restore 0169

 #endregion


check initial value before setting and updating onpropertychanged.

--HG--
branch : dev

--- ImpromptuInterface/src/Dynamic/ImpromptuDictionaryBase.cs
+++ ImpromptuInterface/src/Dynamic/ImpromptuDictionaryBase.cs
@@ -277,8 +277,12 @@

         protected void SetProperty(string key, object value)
         {
-            _dictionary[key] = value;
-            OnPropertyChanged(key);
+            object tOldValue;
+            if (!_dictionary.TryGetValue(key, out tOldValue) || value != tOldValue)
+            {
+                _dictionary[key] = value;
+                OnPropertyChanged(key);
+            }
         }

         /// <summary>


update cdn url

update cdn url

--- src/mikeandwan.us/Views/Shared/_js_Threejs.cshtml
+++ src/mikeandwan.us/Views/Shared/_js_Threejs.cshtml
@@ -1,5 +1,5 @@
 <environment names="Staging,Production">
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r84/three.min.js"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/84/three.min.js"></script>
 </environment>
 <environment names="Development">
     <script src="/js/libs/three/r84/three.min.js"></script>


Incremented version.

Incremented version.

--- src/Abp/AbpConsts.cs
+++ src/Abp/AbpConsts.cs
@@ -8,7 +8,7 @@
         /// <summary>
         /// Current version of the ABP.
         /// </summary>
-        public const string CurrentVersion = "0.7.5.0";
+        public const string CurrentVersion = "0.7.5.1";

         /// <summary>
         /// Localization source name of ASP.NET Boilerplate framework.


Changed from Tuple to KeyValuePair, which makes more sense.

--- Dapplo.HttpExtensions/UriExtensions.cs
+++ Dapplo.HttpExtensions/UriExtensions.cs
@@ -41,24 +41,25 @@
 	public static class UriExtensions
 	{
 		/// <summary>
-		/// Create a query string from a list of tuples
-		/// </summary>
-		/// <param name="tuples">list of tuple string,string</param>
+		/// Create a query string from a list of keyValuePairs
+		/// </summary>
+		/// <typeparam name="T">type for the value</typeparam>
+		/// <param name="keyValuePairs">list of keyValuePair with string,T</param>
 		/// <returns>name1=value1&name2=value2 etc...</returns>
-		public static string ToQueryString<T>(this IEnumerable<Tuple<string, T>> tuples)
-		{
-			if (tuples == null)
-			{
-				throw new ArgumentNullException(nameof(tuples));
+		public static string ToQueryString<T>(this IEnumerable<KeyValuePair<string, T>> keyValuePairs)
+		{
+			if (keyValuePairs == null)
+			{
+				throw new ArgumentNullException(nameof(keyValuePairs));
 			}
 			var queryBuilder = new StringBuilder();

-			foreach (var tuple in tuples)
-			{
-				queryBuilder.Append($"{tuple.Item1}");
-                if (tuple.Item2 != null)
-				{
-					var encodedValue = Uri.EscapeDataString(tuple.Item2?.ToString());
+			foreach (var keyValuePair in keyValuePairs)
+			{
+				queryBuilder.Append($"{keyValuePair.Key}");
+                if (keyValuePair.Value != null)
+				{
+					var encodedValue = Uri.EscapeDataString(keyValuePair.Value?.ToString());
 					queryBuilder.Append($"={encodedValue}");
 				}
                 queryBuilder.Append('&');
@@ -75,29 +76,29 @@
 		public static IDictionary<string, string> QueryToDictionary(this Uri uri)
 		{
 			var parameters = new SortedDictionary<string, string>();
-            foreach (var tuple in uri.QueryToTuples())
-			{
-				if (parameters.ContainsKey(tuple.Item1))
-				{
-					parameters[tuple.Item1] = tuple.Item2;
+            foreach (var keyValuePair in uri.QueryToKeyValuePairs())
+			{
+				if (parameters.ContainsKey(keyValuePair.Key))
+				{
+					parameters[keyValuePair.Key] = keyValuePair.Value;
 				}
 				else
 				{
-					parameters.Add(tuple.Item1, tuple.Item2);
+					parameters.Add(keyValuePair.Key, keyValuePair.Value);
 				}
 			}
 			return parameters;
 		}

 		/// <summary>
-		/// QueryToTuples creates a List with Tuples which have the name-values
+		/// QueryToTuples creates a List with KeyValuePair which have the name-values
 		/// </summary>
 		/// <param name="uri">Uri of which the query is processed</param>
-		/// <returns>List Tuple string, string</returns>
-		public static List<Tuple<string, string>> QueryToTuples(this Uri uri)
+		/// <returns>List KeyValuePair string, string</returns>
+		public static List<KeyValuePair<string, string>> QueryToKeyValuePairs(this Uri uri)
 		{
 			var queryString = uri.Query;
-			var parameters = new List<Tuple<string, string>>();
+			var parameters = new List<KeyValuePair<string, string>>();
 			if (string.IsNullOrEmpty(queryString))
 			{
 				return parameters;
@@ -120,7 +121,7 @@
 				{
 					value = Uri.UnescapeDataString(singlePair[1]);
                 }
-                parameters.Add(new Tuple<string, string>(name, value));
+                parameters.Add(new KeyValuePair<string, string>(name, value));
 			}
 			return parameters;
 		}
@@ -132,8 +133,8 @@
 		/// <returns>ILookup string, string</returns>
 		public static ILookup<string, string> QueryToLookup(this Uri uri)
 		{
-			var parameters = uri.QueryToTuples();
-			return parameters.ToLookup(k => k.Item1, e => e.Item2);
+			var parameters = uri.QueryToKeyValuePairs();
+			return parameters.ToLookup(k => k.Key, e => e.Value);
 		}

 		/// <summary>
@@ -154,15 +155,15 @@
 		/// <returns>Uri with extended query</returns>
 		public static Uri ExtendQuery<T>(this Uri uri, string name, T value)
 		{
-			var tuples = uri.QueryToTuples();
-			tuples.Add(new Tuple<string, string>(name, value?.ToString()));
+			var keyValuePairs = uri.QueryToKeyValuePairs();
+			keyValuePairs.Add(new KeyValuePair<string, string>(name, value?.ToString()));

 			var uriBuilder = new UriBuilder(uri);
-			if (!tuples.Any())
+			if (!keyValuePairs.Any())
 			{
 				return uri;
 			}
-			uriBuilder.Query = tuples.ToQueryString();
+			uriBuilder.Query = keyValuePairs.ToQueryString();
 			return uriBuilder.Uri;
 		}

@@ -183,15 +184,15 @@
 		/// <returns>Uri with extended query</returns>
 		public static Uri ExtendQuery<T>(this Uri uri, IDictionary<string, T> values)
 		{
-			var tuples = uri.QueryToTuples();
-			tuples.AddRange(values.Select(nameValue => new Tuple<string, string>(nameValue.Key, nameValue.Value?.ToString())));
+			var keyValuePairs = uri.QueryToKeyValuePairs();
+			keyValuePairs.AddRange(values.Select(nameValue => new KeyValuePair<string, string>(nameValue.Key, nameValue.Value?.ToString())));

 			var uriBuilder = new UriBuilder(uri);
-			if (!tuples.Any())
+			if (!keyValuePairs.Any())
 			{
 				return uri;
 			}
-			uriBuilder.Query = tuples.ToQueryString();
+			uriBuilder.Query = keyValuePairs.ToQueryString();
 			return uriBuilder.Uri;
 		}

@@ -212,15 +213,15 @@
 		/// <returns>Uri with extended query</returns>
 		public static Uri ExtendQuery<T>(this Uri uri, ILookup<string, T> values)
 		{
-			var tuples = uri.QueryToTuples();
-			tuples.AddRange(from kvp in values from value in kvp select new Tuple<string, string>(kvp.Key, value?.ToString()));
+			var keyValuePairs = uri.QueryToKeyValuePairs();
+			keyValuePairs.AddRange(from kvp in values from value in kvp select new KeyValuePair<string, string>(kvp.Key, value?.ToString()));

 			var uriBuilder = new UriBuilder(uri);
-			if (!tuples.Any())
+			if (!keyValuePairs.Any())
 			{
 				return uri;
 			}
-			uriBuilder.Query = tuples.ToQueryString();
+			uriBuilder.Query = keyValuePairs.ToQueryString();
 			return uriBuilder.Uri;
 		}


Remove comments when we prettify a message

For whatever reason this was hard-coded to false, so we would never in
fact remove comments.

--- LibGit2Sharp/Core/Proxy.cs
+++ LibGit2Sharp/Core/Proxy.cs
@@ -1256,7 +1256,7 @@

             using (var buf = new GitBuf())
             {
-                int res = NativeMethods.git_message_prettify(buf, message, false, (sbyte)comment);
+                int res = NativeMethods.git_message_prettify(buf, message, true, (sbyte)comment);
                 Ensure.Int32Result(res);

                 return LaxUtf8Marshaler.FromNative(buf.ptr) ?? string.Empty;


11.0.3

--- EDDiscovery/Properties/AssemblyInfo.cs
+++ EDDiscovery/Properties/AssemblyInfo.cs
@@ -47,6 +47,6 @@
 // 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("11.1.2.0")]
+[assembly: AssemblyVersion("11.1.3.0")]


8.2.5

--- EDDiscovery/Properties/AssemblyInfo.cs
+++ EDDiscovery/Properties/AssemblyInfo.cs
@@ -47,6 +47,6 @@
 // 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("8.2.4.0")]
-[assembly: AssemblyFileVersion("8.2.4.0")]
+[assembly: AssemblyVersion("8.2.5.0")]
+[assembly: AssemblyFileVersion("8.2.5.0")]


Refactoring.

Refactoring.

--- Libraries/WakeableTimer.cs
+++ Libraries/WakeableTimer.cs
@@ -221,10 +221,10 @@
         {
             if (State != TimerState.Stop) return;

+            var time = Math.Max(delay.TotalMilliseconds, 1);
             State = TimerState.Run;
-            var time = delay > TimeSpan.Zero ? delay : TimeSpan.Zero;
-            Next = DateTime.Now + time;
-            _core.Interval = Math.Max(time.TotalMilliseconds, 1);
+            Next = DateTime.Now + TimeSpan.FromMilliseconds(time);
+            _core.Interval = time;
             _core.Start();
         }


11.10.2

--- EDDiscovery/Properties/AssemblyInfo.cs
+++ EDDiscovery/Properties/AssemblyInfo.cs
@@ -47,6 +47,6 @@
 // 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("11.10.1.0")]
+[assembly: AssemblyVersion("11.10.2.0")]


Restrict access to BuildSettings fields.

--- Editor/Build/Settings/BuildSettings.cs
+++ Editor/Build/Settings/BuildSettings.cs
@@ -1,4 +1,5 @@
 using System;
+using UnityEngine;

 namespace SuperSystems.UnityBuild
 {
@@ -27,13 +28,20 @@

     #region Variables

-    public BasicSettings _basicSettings = new BasicSettings();
-    public ProductParameters _productParameters = new ProductParameters();
-    public BuildReleaseTypeList _releaseTypeList = new BuildReleaseTypeList();
-    public BuildPlatformList _platformList = new BuildPlatformList();
-    public ProjectConfigurations _projectConfigurations = new ProjectConfigurations();
-    public BuildActionList _preBuildActions = new BuildActionList();
-    public BuildActionList _postBuildActions = new BuildActionList();
+    [SerializeField]
+    private BasicSettings _basicSettings = new BasicSettings();
+    [SerializeField]
+    private ProductParameters _productParameters = new ProductParameters();
+    [SerializeField]
+    private BuildReleaseTypeList _releaseTypeList = new BuildReleaseTypeList();
+    [SerializeField]
+    private BuildPlatformList _platformList = new BuildPlatformList();
+    [SerializeField]
+    private ProjectConfigurations _projectConfigurations = new ProjectConfigurations();
+    [SerializeField]
+    private BuildActionList _preBuildActions = new BuildActionList();
+    [SerializeField]
+    private BuildActionList _postBuildActions = new BuildActionList();

     #endregion


Adds option chain universe to data feed

Adds option chain universe to data feed

--- Engine/DataFeeds/FileSystemDataFeed.cs
+++ Engine/DataFeeds/FileSystemDataFeed.cs
@@ -31,6 +31,7 @@
 using QuantConnect.Logging;
 using QuantConnect.Packets;
 using QuantConnect.Securities;
+using QuantConnect.Securities.Option;
 using QuantConnect.Util;

 namespace QuantConnect.Lean.Engine.DataFeeds
@@ -130,9 +131,9 @@
             // get the map file resolver for this market
             var mapFileResolver = MapFileResolver.Empty;
             if (config.SecurityType == SecurityType.Equity) mapFileResolver = _mapFileProvider.Get(config.Market);
-
+
             // ReSharper disable once PossibleMultipleEnumeration
-            var enumerator = CreateSubscriptionEnumerator(security, config, localStartTime, localEndTime, mapFileResolver, tradeableDates);
+            var enumerator = CreateSubscriptionEnumerator(security, config, localStartTime, localEndTime, mapFileResolver, tradeableDates, true, false);

             var enqueueable = new EnqueueableEnumerator<BaseData>(true);

@@ -351,24 +352,40 @@
             {
                 var cf = new CoarseFundamental();

-                var enqueueable = new EnqueueableEnumerator<BaseData>(true);
-
                 // load coarse data day by day
-                var coarse = from date in Time.EachTradeableDayInTimeZone(security.Exchange.Hours, _algorithm.StartDate, _algorithm.EndDate, config.DataTimeZone, config.ExtendedMarketHours)
+                enumerator = (from date in Time.EachTradeableDayInTimeZone(security.Exchange.Hours, _algorithm.StartDate, _algorithm.EndDate, config.DataTimeZone, config.ExtendedMarketHours)
                              let source = cf.GetSource(config, date, false)
                              let factory = SubscriptionFactory.ForSource(source, config, date, false)
                              let coarseFundamentalForDate = factory.Read(source)
-                             select new BaseDataCollection(date.AddDays(1), config.Symbol, coarseFundamentalForDate);
-
+                             select new BaseDataCollection(date.AddDays(1), config.Symbol, coarseFundamentalForDate)
+                             ).GetEnumerator();

-                ScheduleEnumerator(coarse.GetEnumerator(), enqueueable, 5, 100000, 2);
+                var enqueueable = new EnqueueableEnumerator<BaseData>(true);
+                ScheduleEnumerator(enumerator, enqueueable, 5, 100000, 2);

                 enumerator = enqueueable;
             }
+            else if (config.SecurityType == SecurityType.Option && security is Option)
+            {
+                var configs = universe.GetSubscriptions(security);
+                var enumerators = configs.Select(c =>
+                    CreateSubscriptionEnumerator(security, c, localStartTime, localEndTime, _mapFileProvider.Get(c.Market), tradeableDates, false, true)
+                    ).ToList();
+
+                var sync = new SynchronizingEnumerator(enumerators);
+                enumerator = new OptionChainUniverseDataCollectionAggregatorEnumerator(sync, config.Symbol);
+
+                var enqueueable = new EnqueueableEnumerator<BaseData>(true);
+
+                // add this enumerator to our exchange
+                ScheduleEnumerator(enumerator, enqueueable, GetLowerThreshold(config.Resolution), GetUpperThreshold(config.Resolution));
+
+                enumerator = enqueueable;
+            }
             else
             {
                 // normal reader for all others
-                enumerator = CreateSubscriptionEnumerator(security, config, localStartTime, localEndTime, MapFileResolver.Empty, tradeableDates);
+                enumerator = CreateSubscriptionEnumerator(security, config, localStartTime, localEndTime, MapFileResolver.Empty, tradeableDates, true, false);

                 // route these custom subscriptions through the exchange for buffering
                 var enqueueable = new EnqueueableEnumerator<BaseData>(true);
@@ -501,10 +518,31 @@
             DateTime localStartTime,
             DateTime localEndTime,
             MapFileResolver mapFileResolver,
-            IEnumerable<DateTime> tradeableDates)
-        {
-            IEnumerator<BaseData> enumerator = new SubscriptionDataReader(config, localStartTime, localEndTime, _resultHandler, mapFileResolver,
-                _factorFileProvider, tradeableDates, false);
+            IEnumerable<DateTime> tradeableDates,
+            bool useSubscriptionDataReader,
+            bool aggregate)
+        {
+            IEnumerator<BaseData> enumerator;
+            if (useSubscriptionDataReader)
+            {
+                enumerator = new SubscriptionDataReader(config, localStartTime, localEndTime, _resultHandler, mapFileResolver,
+                    _factorFileProvider, tradeableDates, false);
+            }
+            else
+            {
+                var sourceFactory = (BaseData)Activator.CreateInstance(config.Type);
+                enumerator = (from date in tradeableDates
+                              let source = sourceFactory.GetSource(config, date, false)
+                              let factory = SubscriptionFactory.ForSource(source, config, date, false)
+                              let entriesForDate = factory.Read(source)
+                              from entry in entriesForDate
+                              select entry).GetEnumerator();
+            }
+
+            if (aggregate)
+            {
+                enumerator = new BaseDataCollectionAggregatorEnumerator(enumerator, config.Symbol);
+            }

             // optionally apply fill forward logic, but never for tick data
             if (config.FillDataForward && config.Resolution != Resolution.Tick)


Akka.IO bind failed must notify bindCommander of failure

--- src/core/Akka/IO/TcpListener.cs
+++ src/core/Akka/IO/TcpListener.cs
@@ -67,18 +67,29 @@
             _channel = SocketChannel.Open().ConfigureBlocking(false);

             acceptLimit = bind.PullMode ? 0 : _tcp.Settings.BatchAcceptLimit;
-
+
             var localAddress = new Func<EndPoint>(() =>
             {
-                var socket = _channel.Socket;
-                bind.Options.ForEach(x => x.BeforeServerSocketBind(_channel.Socket));
+                try
+                {
+                    var socket = _channel.Socket;
+                    bind.Options.ForEach(x => x.BeforeServerSocketBind(socket));

-                socket.Bind(bind.LocalAddress);
-                socket.Listen(bind.Backlog);
+                    socket.Bind(bind.LocalAddress);
+                    socket.Listen(bind.Backlog);

-                channelRegistry.Register(_channel,
-                    bind.PullMode ? SocketAsyncOperation.None : SocketAsyncOperation.Accept, Self);
-                return socket.LocalEndPoint;
+                    channelRegistry.Register(_channel,
+                        bind.PullMode ? SocketAsyncOperation.None : SocketAsyncOperation.Accept, Self);
+                    return socket.LocalEndPoint;
+                }
+                catch (Exception e)
+                {
+                    _bindCommander.Tell(bind.FailureMessage);
+                    _log.Error(e, "Bind failed for TCP channel on endpoint [{0}]", bind.LocalAddress);
+                    Context.Stop(Self);
+                }
+
+                return bind.LocalAddress;
             })();
         }


release

release

--- Terradue.Tep/Properties/AssemblyInfo.cs
+++ Terradue.Tep/Properties/AssemblyInfo.cs
@@ -4,7 +4,7 @@
 @{
     Terradue.Tep Software Package provides with all the functionalities specific to the TEP.

-    \xrefitem sw_version "Versions" "Software Package Version" 1.3.43
+    \xrefitem sw_version "Versions" "Software Package Version" 1.3.44

     \xrefitem sw_link "Links" "Software Package List" [Terradue.Tep](https://git.terradue.com/sugar/Terradue.Tep)

@@ -77,6 +77,6 @@
 [assembly: AssemblyLicenseUrl("")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("1.3.43")]
-[assembly: AssemblyInformationalVersion("1.3.43")]
+[assembly: AssemblyVersion("1.3.44")]
+[assembly: AssemblyInformationalVersion("1.3.44")]
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]


release

release

--- Terradue.Tep/Properties/AssemblyInfo.cs
+++ Terradue.Tep/Properties/AssemblyInfo.cs
@@ -4,7 +4,7 @@
 @{
     Terradue.Tep Software Package provides with all the functionalities specific to the TEP.

-    \xrefitem sw_version "Versions" "Software Package Version" 1.2.62
+    \xrefitem sw_version "Versions" "Software Package Version" 1.2.63

     \xrefitem sw_link "Links" "Software Package List" [Terradue.Tep](https://git.terradue.com/sugar/Terradue.Tep)

@@ -77,6 +77,6 @@
 [assembly: AssemblyLicenseUrl("")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("1.2.62")]
-[assembly: AssemblyInformationalVersion("1.2.62")]
+[assembly: AssemblyVersion("1.2.63")]
+[assembly: AssemblyInformationalVersion("1.2.63")]
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]


release

release

--- Terradue.Tep/Properties/AssemblyInfo.cs
+++ Terradue.Tep/Properties/AssemblyInfo.cs
@@ -4,7 +4,7 @@
 @{
     Terradue.Tep Software Package provides with all the functionalities specific to the TEP.

-    \xrefitem sw_version "Versions" "Software Package Version" 1.3.45
+    \xrefitem sw_version "Versions" "Software Package Version" 1.3.46

     \xrefitem sw_link "Links" "Software Package List" [Terradue.Tep](https://git.terradue.com/sugar/Terradue.Tep)

@@ -77,6 +77,6 @@
 [assembly: AssemblyLicenseUrl("")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("1.3.45")]
-[assembly: AssemblyInformationalVersion("1.3.45")]
+[assembly: AssemblyVersion("1.3.46")]
+[assembly: AssemblyInformationalVersion("1.3.46")]
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]


#3297 Removed UseHint/UsePlan hints.

#3297 Removed UseHint/UsePlan hints.

--- Tests/Linq/Extensions/SqlServerTests.cs
+++ Tests/Linq/Extensions/SqlServerTests.cs
@@ -807,24 +807,6 @@
 			Assert.That(LastQuery, Contains.Substring("OPTION (USE HINT('ASSUME_JOIN_PREDICATE_DEPENDS_ON_FILTERS'))"));
 		}

-		[Test, Explicit]
-		public void OptionUsePlanTest([IncludeDataSources(true, TestProvName.AllSqlServer)] string context)
-		{
-			using var db = GetDataContext(context);
-
-			var q =
-				(
-					from c in db.Child.TableID("pp")
-					join p in db.Parent on c.ParentID equals p.ParentID
-					select p
-				)
-				.AsSqlServer()
-				.OptionUsePlan("<xml/>");
-
-			_ = q.ToList();
-
-			Assert.That(LastQuery, Contains.Substring("OPTION (TABLE HINT(c_1, NoLock))"));
-		}

 		[Test]
 		public void OptionUseTableTest([IncludeDataSources(true, TestProvName.AllSqlServer2008Plus)] string context)


Debug hashed password

Debug hashed password

--- TorSharp/Tools/Tor/TorPasswordHasher.cs
+++ TorSharp/Tools/Tor/TorPasswordHasher.cs
@@ -1,4 +1,5 @@
-using System.Diagnostics;
+using System;
+using System.Diagnostics;
 using System.Linq;
 using System.Text;

@@ -26,6 +27,8 @@
             process.BeginOutputReadLine();
             process.WaitForExit();

+            Console.WriteLine(sb.ToString());
+
             return sb
                 .ToString()
                 .Split('\n')


获得所有依赖时使用全部依赖。递归时只递归专属资源。

获得所有依赖时使用全部依赖。递归时只递归专属资源。

--- Unity/Assets/Editor/BuildAssetBundle.cs
+++ Unity/Assets/Editor/BuildAssetBundle.cs
@@ -36,7 +36,7 @@
         for (int i = 0; i < list.Count; ++i)
         {
             Ast a = list[i];
-            string [] depends = AssetDatabase.GetDependencies(a.pathName, false);
+            string [] depends = AssetDatabase.GetDependencies(a.pathName, true);
             for (int j = 0; j < depends.Length; ++j)
             {
                 if (depends[j] == a.pathName)
@@ -124,12 +124,13 @@
                 if (d.count == a.count + 1)
                 {
                     array.Add(d);
+                	CalDepends(d, array, global, all);
                 }
                 else
                 {
-                    global.Add(d);
+                	if (!global.Contains(d))
+                    	global.Add(d);
                 }
-                CalDepends(d, array, global, all);
             }
         }
     }


Removed support for mapping TimeSpan on SQL Server, since there is no proper data base type.

--- Upgrader/SqlServer/SqlServerDatabase.cs
+++ Upgrader/SqlServer/SqlServerDatabase.cs
@@ -28,7 +28,6 @@
             TypeMappings.Add<long>("bigint");
             TypeMappings.Add<short>("smallint");
             TypeMappings.Add<string>("nvarchar(50)");
-            TypeMappings.Add<TimeSpan>("time(7)");
         }

         public override bool Exists


Corrected comment.

Corrected comment.

--- Utilities/Mvvm/Commands/RelayCommand.cs
+++ Utilities/Mvvm/Commands/RelayCommand.cs
@@ -68,7 +68,7 @@
 	/// objects by invoking delegates.  In order for CanExecute to return
 	/// true, the command parameter must of type T.
 	/// </summary>
-	/// <typeparam name="T">The type of parameter to be passed tot he command</typeparam>
+	/// <typeparam name="T">The type of parameter to be passed to the command</typeparam>
 	public class RelayCommand<T> : ICommand
 	{
 		/// <summary>


Handle updatechecker nullness

Handle updatechecker nullness

--- WalletWasabi.Gui/Tabs/AboutViewModel.cs
+++ WalletWasabi.Gui/Tabs/AboutViewModel.cs
@@ -30,7 +30,7 @@

 			UpdateChecker = hostedServices.FirstOrDefault<UpdateChecker>();

-			CurrentBackendMajorVersion = UpdateChecker.UpdateStatus?.CurrentBackendApiVersion ?? "";
+			CurrentBackendMajorVersion = UpdateChecker?.UpdateStatus?.CurrentBackendApiVersion ?? "";

 			OpenBrowserCommand = ReactiveCommand.CreateFromTask<string>(IoHelpers.OpenBrowserAsync);

@@ -73,10 +73,14 @@
 		{
 			base.OnOpen(disposables);

-			Observable.FromEventPattern<UpdateStatus>(UpdateChecker, nameof(UpdateChecker.UpdateStatusChanged))
-				.ObserveOn(RxApp.MainThreadScheduler)
-				.Subscribe(e => CurrentBackendMajorVersion = e.EventArgs.CurrentBackendApiVersion)
-				.DisposeWith(disposables);
+			var updateChecker = UpdateChecker;
+			if (updateChecker is { })
+			{
+				Observable.FromEventPattern<UpdateStatus>(updateChecker, nameof(updateChecker.UpdateStatusChanged))
+					.ObserveOn(RxApp.MainThreadScheduler)
+					.Subscribe(e => CurrentBackendMajorVersion = e.EventArgs.CurrentBackendApiVersion)
+					.DisposeWith(disposables);
+			}
 		}
 	}
 }


[WPF] Fix a couple missing Toolkit.Invokes

--- Xwt.WPF/Xwt.WPFBackend/WidgetBackend.cs
+++ Xwt.WPF/Xwt.WPFBackend/WidgetBackend.cs
@@ -861,7 +861,9 @@

 				if (checkArgs.Result == DragDropResult.Canceled || !res) {
 					e.Effects = DragDropEffects.None;
-					eventSink.OnDragFinished (new DragFinishedEventArgs (false));
+					Toolkit.Invoke (delegate {
+						eventSink.OnDragFinished (new DragFinishedEventArgs (false));
+					});
 					return;
 				}
 			}
@@ -884,7 +886,9 @@
 			// No DrapDropCheck/DragDrop event enabled.
 			e.Effects = DragDropEffects.None;

-			this.eventSink.OnDragFinished (new DragFinishedEventArgs (deleteSource));
+			Toolkit.Invoke (delegate {
+				this.eventSink.OnDragFinished (new DragFinishedEventArgs (deleteSource));
+			});
 		}

 		void WidgetDragLeaveHandler (object sender, System.Windows.DragEventArgs e)


Fixed CreateRole

Fixed CreateRole

--- src/Discord.Net/DiscordClient.Roles.cs
+++ src/Discord.Net/DiscordClient.Roles.cs
@@ -84,11 +84,16 @@
 			if (name == null) throw new ArgumentNullException(nameof(name));
 			CheckReady();

-			var response = await _api.CreateRole(server.Id).ConfigureAwait(false);
-			var role = _roles.GetOrAdd(response.Id, server.Id);
-			await _api.EditRole(server.Id, role.Id, name: name).ConfigureAwait(false);
-			response.Name = name;
-			role.Update(response);
+			var response1 = await _api.CreateRole(server.Id).ConfigureAwait(false);
+			var role = _roles.GetOrAdd(response1.Id, server.Id);
+			role.Update(response1);
+
+			var response2 = await _api.EditRole(server.Id, role.Id, name: name).ConfigureAwait(false);
+			//TODO: We shouldnt have to send permissions here, should be fixed on Discord's end soon
+			await _api.EditRole(role.Server.Id, role.Id,
+				name: name,
+				permissions: role.Permissions.RawValue).ConfigureAwait(false);
+			role.Update(response2);

 			return role;
 		}


ExaminingEntityFramework - Added experiment showing that the fluent IQueryable API does not modify in-place, but instead creates new query objects (as expected).

--- Source/Experiments/CSharp/ExaminingEntityFramework/ExaminingEntityFramework/Code/Experiments.cs
+++ Source/Experiments/CSharp/ExaminingEntityFramework/ExaminingEntityFramework/Code/Experiments.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Linq;
 using System.Threading.Tasks;

 using Microsoft.Extensions.DependencyInjection;
@@ -25,7 +26,27 @@
             //Experiments.TestLogging(serviceProvider);
             //Experiments.DoesEFUpdateAllTouchedOrOnlyChangedFields(databaseContext).Wait();
             //Experiments.DoesLabelNeedAddingToContext(databaseContext).Wait();
-            Experiments.WillSubEntityBeFoundLocally(databaseContext);
+            //Experiments.WillSubEntityBeFoundLocally(databaseContext);
+            Experiments.InPlaceOrNew(databaseContext);
+        }
+
+        /// <summary>
+        /// Result: Expected. The fluent API builds new IQueryable (query specification) instances, and does now work in place.
+        /// Does using the fluent API for IQueryable result in in-place modifications to the IQueryable, or does it create new instances of the IQueryable?
+        /// Expected: New instances.
+        /// </summary>
+        private static void InPlaceOrNew(DatabaseContext databaseContext)
+        {
+            var queryBase = databaseContext.EntityAs;
+
+            var query1 = queryBase;
+            query1.Where(x => x.Value2 == 5); // Resulting query is thrown away.
+
+            var results1 = query1.ToList(); // No where clause!
+
+            var query2 = queryBase.Where(x => x.Value2 == 5);
+
+            var results2 = query2.ToList(); // Has where clause.
         }

         /// <summary>


null terminated string in property grid

null terminated string in property grid

--- cs/Manual/Component.cs
+++ cs/Manual/Component.cs
@@ -101,6 +101,7 @@
 					string s_val = (string)val;
 					byte[] str_bytes = System.Text.Encoding.ASCII.GetBytes(s_val);
 					str_bytes.CopyTo(s_imgui_text_buffer, 0);
+					s_imgui_text_buffer[str_bytes.Length] = 0;
 					if (ImGui.InputText(f.Name, s_imgui_text_buffer, 0, IntPtr.Zero, IntPtr.Zero))
 					{
 						string new_val = System.Text.Encoding.ASCII.GetString(s_imgui_text_buffer);


Assert on the full state of test failure exception objects within LifecycleMessageTests.


Set StepOverPropertiesAndOperators to true by default.

--- src/Configuration.cs
+++ src/Configuration.cs
@@ -140,6 +140,7 @@
             Current.MaxConnectionAttempts = 1;
             Current.MemberEvaluationTimeout = 5000;
             Current.RuntimePrefix = "/usr";
+            Current.StepOverPropertiesAndOperators = true;
         }

         public static void Apply()


Seperated out Actor into base class and class that supports generic actor

--- src/Daytona/Actor.cs
+++ src/Daytona/Actor.cs
@@ -17,33 +17,299 @@

     using ZeroMQ;

-    //public class Actor : Actor<T>
-    //{
-    //    #region Fields
-
-    //    private ZmqContext context;
-
-    //    #endregion
-
-    //    #region Constructors and Destructors
-
-    //    public Actor(ZmqContext context)
-    //    {
-    //        // TODO: Complete member initialization
-    //        this.context = context;
-    //    }
-
-    //    #endregion
-
-    //    #region Public Methods and Operators
-
-    //    public virtual Actor<TObject> RegisterActor<TObject>(TObject objectToRun) where TObject : class
-    //    {
-    //        throw new NotImplementedException();
-    //    }
-
-    //    #endregion
-    //}
+
+
+    public class Actor : IDisposable
+    {
+        private static readonly object SynchLock = new object();
+
+        private readonly Dictionary<string, Action> actorTypes = new Dictionary<string, Action>();
+
+        [NonSerialized]
+        protected ZmqContext context;
+
+        private bool disposed;
+
+        [NonSerialized]
+        private ZmqSocket monitorChannel;
+
+        private bool monitorChannelDisposed = false;
+
+        [NonSerialized]
+        private ZmqSocket outputChannel;
+
+        [NonSerialized]
+        private ISerializer serializer;
+
+        [NonSerialized]
+        public ZmqSocket subscriber;
+
+        private bool subscriberDisposed = false;
+
+        /// <summary>
+        ///     Initializes a new instance of the <see cref="Actor{T}" /> class.
+        ///     This is generally used when creating a actor to act as a Actor factory.
+        /// </summary>
+        /// <param name="context">The context.</param>
+        public Actor(ZmqContext context)
+        {
+            this.IsRunning = false;
+            this.context = context;
+            this.Serializer = new DefaultSerializer(Encoding.Unicode);
+            this.SetUpMonitorChannel(context);
+            this.SetUpOutputChannel(context);
+            this.PropertyBag = new Dictionary<string, string>();
+        }
+
+        public Actor(ZmqContext context, ISerializer serializer)
+        {
+            this.IsRunning = false;
+            this.context = context;
+            this.Serializer = serializer;
+            this.SetUpMonitorChannel(context);
+            this.SetUpOutputChannel(context);
+        }
+
+        public virtual event EventHandler<CallBackEventArgs> SaveCompletedEvent;
+
+        public Delegate Callback { get; set; }
+
+        public int Id { get; set; }
+
+        public string InRoute { get; set; }
+
+        public bool IsRunning { get; set; }
+
+        public ZmqSocket MonitorChannel
+        {
+            get
+            {
+                return this.monitorChannel;
+            }
+
+            set
+            {
+                this.monitorChannel = value;
+            }
+        }
+
+        public string OutRoute { get; set; }
+
+        public ZmqSocket OutputChannel
+        {
+            get
+            {
+                return this.outputChannel;
+            }
+
+            set
+            {
+                this.outputChannel = value;
+            }
+        }
+
+        public bool OutputChannelDisposed
+        {
+            get
+            {
+                return this.monitorChannelDisposed;
+            }
+
+            set
+            {
+                this.monitorChannelDisposed = value;
+            }
+        }
+
+        public Dictionary<string, string> PropertyBag { get; set; }
+
+        public ISerializer Serializer
+        {
+            get
+            {
+                return this.serializer;
+            }
+
+            set
+            {
+                this.serializer = value;
+            }
+        }
+
+        public Delegate Workload { get; set; }
+
+        public static void Writeline(string line)
+        {
+            lock (SynchLock)
+            {
+                var fi = new FileInfo(@"c:\dev\Actor.log");
+                var stream = fi.AppendText();
+                stream.WriteLine(line);
+                stream.Flush();
+                stream.Close();
+            }
+        }
+
+        public void CallBack(int result, List<IPayload> payload, Exception exception)
+        {
+            var eventArgs = new CallBackEventArgs { Result = result, Error = exception, Payload = payload };
+
+            this.SaveCompletedEvent(this, eventArgs);
+        }
+
+
+
+        /// <summary>
+        ///     Create and start a new actor by invoking the Lambda registered with the name provided. This new actor is
+        ///     created on its own thread
+        /// </summary>
+        /// <param name="name">name of the actor</param>
+        public void CreateNewActor(string name)
+        {
+            Action del;
+            if (this.actorTypes.TryGetValue(name, out del))
+            {
+                Task.Run(() => { del.DynamicInvoke(); });
+            }
+        }
+
+        public void Dispose()
+        {
+            this.Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        public void SendMessage(string address, byte[] message, ISerializer serializer, ZmqSocket socket)
+        {
+            this.SendMessage(serializer.Encoding.GetBytes(address), message, socket);
+        }
+
+        public void SendMessage(byte[] address, byte[] message, ZmqSocket socket)
+        {
+            var zmqMessage = new ZmqMessage();
+            zmqMessage.Append(new Frame(address));
+            zmqMessage.Append(new Frame(message));
+            socket.SendMessage(zmqMessage);
+        }
+
+        public void SendOneMessageOfType<T>(string address, T message, ISerializer serializer, ZmqSocket socket)
+            where T : IPayload
+        {
+            var zmqMessage = new ZmqMessage();
+            zmqMessage.Append(new Frame(serializer.GetBuffer(address)));
+            zmqMessage.Append(new Frame(serializer.GetBuffer(message)));
+
+            ////var replySignal = this.sendControlChannel.Receive(Pipe.ControlChannelEncoding);
+            socket.SendMessage(zmqMessage);
+
+            ////this.sendControlChannel.Send("Just sent message to " + address + " Message is: " + message, Pipe.ControlChannelEncoding);
+            ////replySignal = this.sendControlChannel.Receive(Pipe.ControlChannelEncoding);
+            ////Actor.Writeline(replySignal);
+        }
+
+        /// <summary>
+        ///     Create and start all actors that are registered in the collection of subActors. this
+        ///     is done by invoking the Lambda registered in the collection.
+        ///     Each actor is started on its own thread
+        /// </summary>
+        public void StartAllActors()
+        {
+            foreach (var item in this.actorTypes)
+            {
+                Task.Run(() => { item.Value.DynamicInvoke(); });
+            }
+        }
+
+        public void WriteLineToMonitor(string line)
+        {
+            if (this.monitorChannelDisposed == false)
+            {
+                this.MonitorChannel.Send(line, Pipe.ControlChannelEncoding);
+                var signal = this.MonitorChannel.Receive(Pipe.ControlChannelEncoding);
+            }
+        }
+
+        private void Dispose(bool disposing)
+        {
+            if (!this.disposed)
+            {
+                if (disposing)
+                {
+                    if (this.subscriber != null)
+                    {
+                        this.subscriberDisposed = true;
+                        this.subscriber.Dispose();
+                    }
+
+                    if (this.OutputChannel != null)
+                    {
+                        this.OutputChannelDisposed = true;
+                        this.OutputChannel.Dispose();
+                    }
+
+                    if (this.MonitorChannel != null)
+                    {
+                        this.monitorChannelDisposed = true;
+                        this.MonitorChannel.Dispose();
+                    }
+                }
+
+                //// There are no unmanaged resources to release, but
+                //// if we add them, they need to be released here.
+            }
+
+            this.disposed = true;
+        }
+
+        protected void SetUpMonitorChannel(ZmqContext context)
+        {
+            this.MonitorChannel = context.CreateSocket(SocketType.REQ);
+            this.MonitorChannel.Connect(Pipe.MonitorAddressClient);
+        }
+
+        protected void SetUpOutputChannel(ZmqContext context)
+        {
+            this.OutputChannel = context.CreateSocket(SocketType.PUB);
+            this.OutputChannel.Connect(Pipe.PublishAddressClient);
+
+            this.WriteLineToMonitor(
+                "Set up output channel on " + Pipe.PublishAddressClient + " Default sending on: " + this.OutRoute);
+
+            ////if(this.sendControlChannel == null)
+            ////{
+            ////    this.sendControlChannel = context.CreateSocket(SocketType.REQ);
+            ////    this.sendControlChannel.Connect(Pipe.PubSubControlBackAddressClient);
+            ////}
+            ////this.sendControlChannel.Send("Actor OutputChannel connected, Sending on " + Pipe.PublishAddressClient, Pipe.ControlChannelEncoding);
+            ////var replySignal = this.sendControlChannel.Receive(Pipe.ControlChannelEncoding);
+            ////Actor.Writeline(replySignal);
+        }
+
+        /// <summary>
+        ///     Creates a Socket and connects it to a endpoint that is bound to a Pipe
+        /// </summary>
+        /// <param name="context">The ZeroMQ context required to create the receivers</param>
+        private void SetUpReceivers(ZmqContext context)
+        {
+            this.subscriber = context.CreateSocket(SocketType.SUB);
+            this.subscriber.Connect(Pipe.SubscribeAddressClient);
+            this.subscriber.Subscribe(this.Serializer.GetBuffer(this.InRoute));
+            this.MonitorChannel.Send(
+                "Set up Receive channel on " + Pipe.SubscribeAddressClient + " listening on: " + this.InRoute,
+                Pipe.ControlChannelEncoding);
+            var signal = this.MonitorChannel.Receive(Pipe.ControlChannelEncoding);
+            this.SendMessage(
+                Pipe.ControlChannelEncoding.GetBytes(Pipe.SubscriberCountAddress),
+                Pipe.ControlChannelEncoding.GetBytes("ADDSUBSCRIBER"),
+                this.OutputChannel);
+        }
+
+        protected void SetUpReceivers(ZmqContext context, string route)
+        {
+            this.InRoute = route;
+            this.SetUpReceivers(context);
+        }
+    }

     /// <summary>
     ///     The Actor is the coe object of the Actor framework, it is self configuring to listen for messages that come in and
@@ -54,57 +320,21 @@
     ///     The object to compose with this actor
     /// </typeparam>
     [Serializable]
-    public class Actor<T> : IDisposable
-        where T : class
+    public class Actor<T> : Actor where T : class
     {
-        private static readonly object SynchLock = new object();
-
-        private readonly Dictionary<string, Action> actorTypes = new Dictionary<string, Action>();
-
-        [NonSerialized]
-        private readonly ZmqContext context;
-
-        private bool disposed;
-
         private T model;

-        [NonSerialized]
-        private ZmqSocket monitorChannel;
-
-        private bool monitorChannelDisposed = false;
-
-        [NonSerialized]
-        private ZmqSocket outputChannel;
-
-        [NonSerialized]
-        private ISerializer serializer;
-
-        [NonSerialized]
-        public ZmqSocket subscriber;
-
-        private bool subscriberDisposed = false;
-
         /// <summary>
         ///     Initializes a new instance of the <see cref="Actor" /> class.
         ///     This is generally used when creating a actor to act as a Actor factory.
         /// </summary>
         /// <param name="context">The context.</param>
-        public Actor(ZmqContext context)
-        {
-            this.IsRunning = false;
-            this.context = context;
-            this.Serializer = new DefaultSerializer(Encoding.Unicode);
-            this.SetUpMonitorChannel(context);
-            this.SetUpOutputChannel(context);
-        }
-
-        public Actor(ZmqContext context, ISerializer serializer)
-        {
-            this.IsRunning = false;
-            this.context = context;
-            this.Serializer = serializer;
-            this.SetUpMonitorChannel(context);
-            this.SetUpOutputChannel(context);
+        public Actor(ZmqContext context) : base(context)
+        {
+        }
+
+        public Actor(ZmqContext context, ISerializer serializer) : base(context, serializer)
+        {
             var inRoute = typeof(T)
                 .FullName.Replace("{", string.Empty)
                 .Replace("}", string.Empty)
@@ -113,21 +343,15 @@
             this.SetUpReceivers(context, inRoute);
         }

-        public Actor(ZmqContext context, T model)
-        {
-            this.IsRunning = false;
-            this.context = context;
+        public Actor(ZmqContext context, T model) : base (context)
+        {
             this.model = model;
-            this.Serializer = new DefaultSerializer(Encoding.Unicode);
-            this.SetUpMonitorChannel(context);
-            this.SetUpOutputChannel(context);
             var inRoute =
                 typeof(T).Name.Replace("{", string.Empty)
                     .Replace("}", string.Empty)
                     .Replace("_", string.Empty)
                     .Replace(".", string.Empty);
             this.SetUpReceivers(context, inRoute);
-            this.PropertyBag = new Dictionary<string, string>();
         }

         public Actor(ZmqContext context, T model, ISerializer serializer)
@@ -136,119 +360,7 @@
             this.Serializer = serializer;
         }

-        public event EventHandler<CallBackEventArgs> SaveCompletedEvent;
-
-        public Delegate Callback { get; set; }
-
-        public int Id { get; set; }
-
-        public string InRoute { get; set; }
-
-        public bool IsRunning { get; set; }
-
-        public ZmqSocket MonitorChannel
-        {
-            get
-            {
-                return this.monitorChannel;
-            }
-
-            set
-            {
-                this.monitorChannel = value;
-            }
-        }
-
-        public string OutRoute { get; set; }
-
-        public ZmqSocket OutputChannel
-        {
-            get
-            {
-                return this.outputChannel;
-            }
-
-            set
-            {
-                this.outputChannel = value;
-            }
-        }
-
-        public bool OutputChannelDisposed
-        {
-            get
-            {
-                return this.monitorChannelDisposed;
-            }
-
-            set
-            {
-                this.monitorChannelDisposed = value;
-            }
-        }
-
-        public Dictionary<string, string> PropertyBag { get; set; }
-
-        public ISerializer Serializer
-        {
-            get
-            {
-                return this.serializer;
-            }
-
-            set
-            {
-                this.serializer = value;
-            }
-        }
-
-        public Delegate Workload { get; set; }
-
-        public static void Writeline(string line)
-        {
-            lock (SynchLock)
-            {
-                var fi = new FileInfo(@"c:\dev\Actor.log");
-                var stream = fi.AppendText();
-                stream.WriteLine(line);
-                stream.Flush();
-                stream.Close();
-            }
-        }
-
-        public void CallBack(int result, List<IPayload> payload, Exception exception)
-        {
-            var eventArgs = new CallBackEventArgs { Result = result, Error = exception, Payload = payload };
-
-            this.SaveCompletedEvent(this, eventArgs);
-        }
-
-        public TInterface CreateInstance<TInterface>() where TInterface : class
-        {
-            var invocationHandler = new MessageSenderProxy<T>(this);
-            var proxyFactory = new ProxyFactory();
-            return proxyFactory.CreateProxy<TInterface>(Type.EmptyTypes, invocationHandler);
-        }
-
-        /// <summary>
-        ///     Create and start a new actor by invoking the Lambda registered with the name provided. This new actor is
-        ///     created on its own thread
-        /// </summary>
-        /// <param name="name">name of the actor</param>
-        public void CreateNewActor(string name)
-        {
-            Action del;
-            if (this.actorTypes.TryGetValue(name, out del))
-            {
-                Task.Run(() => { del.DynamicInvoke(); });
-            }
-        }
-
-        public void Dispose()
-        {
-            this.Dispose(true);
-            GC.SuppressFinalize(this);
-        }
+        public override event EventHandler<CallBackEventArgs> SaveCompletedEvent;

         //public Actor<T> RegisterActor<TObject>(TObject objectToRun) where TObject : class
         //{
@@ -270,34 +382,6 @@

         //    return this;
         //}
-
-        public void SendMessage(string address, byte[] message, ISerializer serializer, ZmqSocket socket)
-        {
-            this.SendMessage(serializer.Encoding.GetBytes(address), message, socket);
-        }
-
-        public void SendMessage(byte[] address, byte[] message, ZmqSocket socket)
-        {
-            var zmqMessage = new ZmqMessage();
-            zmqMessage.Append(new Frame(address));
-            zmqMessage.Append(new Frame(message));
-            socket.SendMessage(zmqMessage);
-        }
-
-        public void SendOneMessageOfType<T>(string address, T message, ISerializer serializer, ZmqSocket socket)
-            where T : IPayload
-        {
-            var zmqMessage = new ZmqMessage();
-            zmqMessage.Append(new Frame(serializer.GetBuffer(address)));
-            zmqMessage.Append(new Frame(serializer.GetBuffer(message)));
-
-            ////var replySignal = this.sendControlChannel.Receive(Pipe.ControlChannelEncoding);
-            socket.SendMessage(zmqMessage);
-
-            ////this.sendControlChannel.Send("Just sent message to " + address + " Message is: " + message, Pipe.ControlChannelEncoding);
-            ////replySignal = this.sendControlChannel.Receive(Pipe.ControlChannelEncoding);
-            ////Actor.Writeline(replySignal);
-        }

         /// <summary>
         ///     Start is called on all actors to have them listen for messages, they will receive and process one message
@@ -357,6 +441,12 @@
         //    }
         //}

+        public TInterface CreateInstance<TInterface>() where TInterface : class
+        {
+            var invocationHandler = new MessageSenderProxy<T>(this);
+            var proxyFactory = new ProxyFactory();
+            return proxyFactory.CreateProxy<TInterface>(Type.EmptyTypes, invocationHandler);
+        }

         public void Start()
         {
@@ -382,28 +472,6 @@
             this.WriteLineToMonitor("Exiting actor");
         }

-        /// <summary>
-        ///     Create and start all actors that are registered in the collection of subActors. this
-        ///     is done by invoking the Lambda registered in the collection.
-        ///     Each actor is started on its own thread
-        /// </summary>
-        public void StartAllActors()
-        {
-            foreach (var item in this.actorTypes)
-            {
-                Task.Run(() => { item.Value.DynamicInvoke(); });
-            }
-        }
-
-        public void WriteLineToMonitor(string line)
-        {
-            if (this.monitorChannelDisposed == false)
-            {
-                this.MonitorChannel.Send(line, Pipe.ControlChannelEncoding);
-                var signal = this.MonitorChannel.Receive(Pipe.ControlChannelEncoding);
-            }
-        }
-
         public void SendMessage(object[] parameters, MethodInfo methodInfo)
         {
             var zmqMessage = new ZmqMessage();
@@ -425,39 +493,6 @@

             this.OutputChannel.SendMessage(zmqMessage);
         }
-
-        private void Dispose(bool disposing)
-        {
-            if (!this.disposed)
-            {
-                if (disposing)
-                {
-                    if (this.subscriber != null)
-                    {
-                        this.subscriberDisposed = true;
-                        this.subscriber.Dispose();
-                    }
-
-                    if (this.OutputChannel != null)
-                    {
-                        this.OutputChannelDisposed = true;
-                        this.OutputChannel.Dispose();
-                    }
-
-                    if (this.MonitorChannel != null)
-                    {
-                        this.monitorChannelDisposed = true;
-                        this.MonitorChannel.Dispose();
-                    }
-                }
-
-                //// There are no unmanaged resources to release, but
-                //// if we add them, they need to be released here.
-            }
-
-            this.disposed = true;
-        }
-

         public bool ReceiveMessage(ZmqSocket subscriber)
         {
@@ -548,55 +583,5 @@
             }
             return stopSignal;
         }
-
-
-        private void SetUpMonitorChannel(ZmqContext context)
-        {
-            this.MonitorChannel = context.CreateSocket(SocketType.REQ);
-            this.MonitorChannel.Connect(Pipe.MonitorAddressClient);
-        }
-
-        private void SetUpOutputChannel(ZmqContext context)
-        {
-            this.OutputChannel = context.CreateSocket(SocketType.PUB);
-            this.OutputChannel.Connect(Pipe.PublishAddressClient);
-
-            this.WriteLineToMonitor(
-                "Set up output channel on " + Pipe.PublishAddressClient + " Default sending on: " + this.OutRoute);
-
-            ////if(this.sendControlChannel == null)
-            ////{
-            ////    this.sendControlChannel = context.CreateSocket(SocketType.REQ);
-            ////    this.sendControlChannel.Connect(Pipe.PubSubControlBackAddressClient);
-            ////}
-            ////this.sendControlChannel.Send("Actor OutputChannel connected, Sending on " + Pipe.PublishAddressClient, Pipe.ControlChannelEncoding);
-            ////var replySignal = this.sendControlChannel.Receive(Pipe.ControlChannelEncoding);
-            ////Actor.Writeline(replySignal);
-        }
-
-        /// <summary>
-        ///     Creates a Socket and connects it to a endpoint that is bound to a Pipe
-        /// </summary>
-        /// <param name="context">The ZeroMQ context required to create the receivers</param>
-        private void SetUpReceivers(ZmqContext context)
-        {
-            this.subscriber = context.CreateSocket(SocketType.SUB);
-            this.subscriber.Connect(Pipe.SubscribeAddressClient);
-            this.subscriber.Subscribe(this.Serializer.GetBuffer(this.InRoute));
-            this.MonitorChannel.Send(
-                "Set up Receive channel on " + Pipe.SubscribeAddressClient + " listening on: " + this.InRoute,
-                Pipe.ControlChannelEncoding);
-            var signal = this.MonitorChannel.Receive(Pipe.ControlChannelEncoding);
-            this.SendMessage(
-                Pipe.ControlChannelEncoding.GetBytes(Pipe.SubscriberCountAddress),
-                Pipe.ControlChannelEncoding.GetBytes("ADDSUBSCRIBER"),
-                this.OutputChannel);
-        }
-
-        private void SetUpReceivers(ZmqContext context, string route)
-        {
-            this.InRoute = route;
-            this.SetUpReceivers(context);
-        }
     }
 }


BugFix : Don't enable modules when they aren't enabled

--- src/Kerbalism/Lib.cs
+++ src/Kerbalism/Lib.cs
@@ -1066,8 +1066,6 @@
 			{
 				case Game.Modes.CAREER:
 				case Game.Modes.SCIENCE_SANDBOX:
-					m.enabled = true;
-					m.isEnabled = true;
 					return true;
 				default:
 					m.enabled = false;


More MessageReader cleanups

More MessageReader cleanups

--- src/MessageReader.cs
+++ src/MessageReader.cs
@@ -66,7 +66,7 @@
 				GetValueStruct (type, out val);
 			} else {
 				DType dtype = Signature.TypeToDType (type);
-				GetValue (dtype, out val);
+				val = ReadValue (dtype);
 			}

 			if (type.IsEnum)
@@ -74,97 +74,56 @@
 		}

 		//helper method, should not be used generally
-		public void GetValue (DType dtype, out object val)
+		public object ReadValue (DType dtype)
 		{
 			switch (dtype)
 			{
 				case DType.Byte:
-				{
-					val = ReadByte ();
-				}
-				break;
+					return ReadByte ();
+
 				case DType.Boolean:
-				{
-					val = ReadBoolean ();
-				}
-				break;
+					return ReadBoolean ();
+
 				case DType.Int16:
-				{
-					short vval;
-					GetValue (out vval);
-					val = vval;
-				}
-				break;
+					return ReadInt16 ();
+
 				case DType.UInt16:
-				{
-					ushort vval;
-					GetValue (out vval);
-					val = vval;
-				}
-				break;
+					return ReadUInt16 ();
+
 				case DType.Int32:
-				{
-					val = ReadInt32 ();
-				}
-				break;
+					return ReadInt32 ();
+
 				case DType.UInt32:
-				{
-					val = ReadUInt32 ();
-				}
-				break;
+					return ReadUInt32 ();
+
 				case DType.Int64:
-				{
-					long vval;
-					GetValue (out vval);
-					val = vval;
-				}
-				break;
+					return ReadInt64 ();
+
 				case DType.UInt64:
-				{
-					ulong vval;
-					GetValue (out vval);
-					val = vval;
-				}
-				break;
+					return ReadUInt64 ();
+
 #if !DISABLE_SINGLE
 				case DType.Single:
-				{
-					float vval;
-					GetValue (out vval);
-					val = vval;
-				}
-				break;
+					return ReadSingle ();
 #endif
+
 				case DType.Double:
-				{
-					double vval;
-					GetValue (out vval);
-					val = vval;
-				}
-				break;
+					return ReadDouble ();
+
 				case DType.String:
-				{
-					val = ReadString ();
-				}
-				break;
+					return ReadString ();
+
 				case DType.ObjectPath:
-				{
-					val = ReadObjectPath ();
-				}
-				break;
+					return ReadObjectPath ();
+
 				case DType.Signature:
-				{
-					val = ReadSignature ();
-				}
-				break;
+					return ReadSignature ();
+
 				case DType.Variant:
-				{
-					val = ReadVariant ();
-				}
-				break;
+					return ReadVariant ();
+
 				default:
-				val = null;
-				throw new Exception ("Unhandled D-Bus type: " + dtype);
+					throw new Exception ("Unhandled D-Bus type: " + dtype);
 			}
 		}

@@ -209,16 +168,22 @@
 			pos += 2;
 		}

-		unsafe public void GetValue (out short val)
-		{
-			fixed (short* ret = &val)
-				MarshalUShort ((byte*)ret);
-		}
-
-		unsafe public void GetValue (out ushort val)
-		{
-			fixed (ushort* ret = &val)
-				MarshalUShort ((byte*)ret);
+		unsafe public short ReadInt16 ()
+		{
+			short val;
+
+			MarshalUShort ((byte*)&val);
+
+			return val;
+		}
+
+		unsafe public ushort ReadUInt16 ()
+		{
+			ushort val;
+
+			MarshalUShort ((byte*)&val);
+
+			return val;
 		}

 		unsafe protected void MarshalUInt (byte *dst)
@@ -273,30 +238,42 @@
 			pos += 8;
 		}

-		unsafe public void GetValue (out long val)
-		{
-			fixed (long* ret = &val)
-				MarshalULong ((byte*)ret);
-		}
-
-		unsafe public void GetValue (out ulong val)
-		{
-			fixed (ulong* ret = &val)
-				MarshalULong ((byte*)ret);
+		unsafe public long ReadInt64 ()
+		{
+			long val;
+
+			MarshalULong ((byte*)&val);
+
+			return val;
+		}
+
+		unsafe public ulong ReadUInt64 ()
+		{
+			ulong val;
+
+			MarshalULong ((byte*)&val);
+
+			return val;
 		}

 #if !DISABLE_SINGLE
-		unsafe public void GetValue (out float val)
-		{
-			fixed (float* ret = &val)
-				MarshalUInt ((byte*)ret);
+		unsafe public float ReadSingle ()
+		{
+			float val;
+
+			MarshalUInt ((byte*)&val);
+
+			return val;
 		}
 #endif

-		unsafe public void GetValue (out double val)
-		{
-			fixed (double* ret = &val)
-				MarshalULong ((byte*)ret);
+		unsafe public double ReadDouble ()
+		{
+			double val;
+
+			MarshalULong ((byte*)&val);
+
+			return val;
 		}

 		public string ReadString ()
@@ -333,7 +310,7 @@
 			return ReadVariant (ReadSignature ());
 		}

-		public object ReadVariant (Signature sig)
+		object ReadVariant (Signature sig)
 		{
 			object val;


Event pipe guid in metadata (#16316), fixes #16105

* some refactor to remove dumplicated code in tests and make them fit 1 screen

* write the failing test for no activity id

* use 17, the "free slot" of TypeCode enum to represent Guid in event pipe metadata

* remove the test which would not pass until new trace event is released and Event Pipe enabled for Windows

* added comment to TypeCode about using the value 17

* post code review fixes (thanks @justinvp)

* post code review fixes (thanks @brianrob)

* refactor the rest of event pipe tests to use NetPerfFile helper

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

--- src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
+++ src/System.Private.CoreLib/shared/System/Diagnostics/Tracing/EventSource.cs
@@ -20,13 +20,13 @@
 //
 // Conceptually and EventSouce is something takes event logging data from the source methods
 // To the EventListener that can subscribe them.  Note that CONCEPTUALLY EVENTSOURCES DON'T
-// KNOW ABOUT ETW!.   The MODEL of the system is that there is a special EventListern Which
+// KNOW ABOUT ETW!.   The MODEL of the system is that there is a special EventListener Which
 // we will call the EtwEventListener, that forwards commands from ETW to EventSources and
 // listeners to the EventSources and forwards on those events to ETW.   THus the model should
 // be that you DON'T NEED ETW.
 //
 // Now in actual practice, EventSouce have rather intimate knowledge of ETW and send events
-// to it directly, but this can be VIEWED AS AN OPTIMIATION.
+// to it directly, but this can be VIEWED AS AN OPTIMIZATION.
 //
 // Basic Event Data Flow:
 //
@@ -656,7 +656,7 @@
                     foreach (var parameter in m_eventData[i].Parameters)
                     {
                         // Write parameter type.
-                        WriteToBuffer(pMetadata, metadataLength, ref offset, (uint)Type.GetTypeCode(parameter.ParameterType));
+                        WriteToBuffer(pMetadata, metadataLength, ref offset, (uint)GetTypeCodeExtended(parameter.ParameterType));

                         // Write parameter name.
                         string parameterName = parameter.Name;
@@ -698,7 +698,19 @@
             Debug.Assert(bufferLength >= (offset + 8));
             *(long *)(buffer + offset) = value;
             offset += 8;
-        }
+        }
+
+        private static TypeCode GetTypeCodeExtended(Type parameterType)
+        {
+            // Guid is not part of TypeCode, we decided to use 17 to represent it, as it's the "free slot"
+            // see https://github.com/dotnet/coreclr/issues/16105#issuecomment-361749750 for more
+            const TypeCode GuidTypeCode = (TypeCode)17;
+
+            if (parameterType == typeof(Guid)) // Guid is not a part of TypeCode enum
+                return GuidTypeCode;
+
+            return Type.GetTypeCode(parameterType);
+        }
 #endif

         internal virtual void GetMetadata(out Guid eventSourceGuid, out string eventSourceName, out EventMetadata[] eventData, out byte[] manifestBytes)


Fix incorrect EHCount calculation (#24048)

--- src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
+++ src/System.Private.CoreLib/src/System/Reflection/Emit/DynamicILGenerator.cs
@@ -724,7 +724,12 @@

                 if ((header & 0x40) != 0) // Fat
                 {
-                    EHCount = (BinaryPrimitives.ReadInt32LittleEndian(m_exceptionHeader.AsSpan(1)) - 4) / 24;
+                    // Positions 1..3 of m_exceptionHeader are a 24-bit little-endian integer.
+                    int size = m_exceptionHeader[3] << 16;
+                    size |= m_exceptionHeader[2] << 8;
+                    size |= m_exceptionHeader[1];
+
+                    EHCount = (size - 4) / 24;
                 }
                 else
                     EHCount = (m_exceptionHeader[1] - 2) / 12;


Rollback

Rollback

--- src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.cs
+++ src/VisualStudio/Core/Def/Implementation/ColorSchemes/ColorSchemeApplier.cs
@@ -54,7 +54,7 @@
             _colorSchemes = _settings.GetColorSchemes();
             _colorDefaulter = new ForegroundColorDefaulter(threadingContext, serviceProvider, _settings, _colorSchemes);

-            _colorSchemeRegistryItems = AsyncLazy.Create<ImmutableDictionary<SchemeName, ImmutableArray<RegistryItem>>>(GetColorSchemeRegistryItemsAsync, cacheResult: true);
+            _colorSchemeRegistryItems = new AsyncLazy<ImmutableDictionary<SchemeName, ImmutableArray<RegistryItem>>>(GetColorSchemeRegistryItemsAsync, cacheResult: true);
         }

         public void Dispose()


only attempt a flush if no exception

only attempt a flush if no exception

--- src/FODT/Controllers/BaseController.cs
+++ src/FODT/Controllers/BaseController.cs
@@ -40,7 +40,7 @@
         protected override void OnActionExecuted(ActionExecutedContext filterContext)
         {
             var isHTTPGET = filterContext.HttpContext.Request.HttpMethod.Equals("GET", StringComparison.InvariantCultureIgnoreCase);
-            if (databaseSession != null)
+            if (databaseSession != null && filterContext.Exception == null)
             {
                 try
                 {


AssertionExtensions.ShouldThrow returns the exception casted to the expected type.

--- src/Fixie.Tests/AssertionExtensions.cs
+++ src/Fixie.Tests/AssertionExtensions.cs
@@ -12,7 +12,7 @@
             Assert.Equal(expected, actual.ToArray());
         }

-        public static Exception ShouldThrow<TException>(this Action shouldThrow, string expectedMessage) where TException : Exception
+        public static TException ShouldThrow<TException>(this Action shouldThrow, string expectedMessage) where TException : Exception
         {
             bool threw = false;
             Exception exception = null;
@@ -30,7 +30,7 @@
             }

             threw.ShouldBeTrue();
-            return exception;
+            return (TException)exception;
         }
     }
 }


Made public the finding of enabled type maps by strings.

Signed-off-by: Dimitar Dobrev <ca751a5c976abad79158718440750fc638d19ebc@protonmail.com>

--- src/Generator/Types/TypeMapDatabase.cs
+++ src/Generator/Types/TypeMapDatabase.cs
@@ -110,7 +110,7 @@
         public bool FindTypeMap(Declaration declaration, out TypeMap typeMap) =>
             FindTypeMap(new TagType(declaration), out typeMap);

-        private bool FindTypeMap(string name, out TypeMap typeMap) =>
+        public bool FindTypeMap(string name, out TypeMap typeMap) =>
             TypeMaps.TryGetValue(name, out typeMap) && typeMap.IsEnabled;

         private Dictionary<Type, TypeMap> typeMaps = new Dictionary<Type, TypeMap>();


It's reeeeaally nice if we don't throw

It's reeeeaally nice if we don't throw

--- src/GitHub.Api/IO/FileSystemHelpers.cs
+++ src/GitHub.Api/IO/FileSystemHelpers.cs
@@ -7,15 +7,16 @@
     {
         public static string FindCommonPath(IEnumerable<string> paths)
         {
-            var parentPaths = paths.Where(s => s != null).Select(s => s.ToNPath().Parent).ToArray();
+            var parentPaths = paths.Where(s => !string.IsNullOrEmpty(s)).Select(s => s.ToNPath().Parent);
             if (!parentPaths.Any())
                 return null;

-            var maxDepth = parentPaths.Max(path => path.Depth);
-            var deepestPath = parentPaths.First(path => path.Depth == maxDepth);
+            var parentsArray = parentPaths.ToArray();
+            var maxDepth = parentsArray.Max(path => path.Depth);
+            var deepestPath = parentsArray.First(path => path.Depth == maxDepth);

             var commonParent = deepestPath;
-            foreach (var path in parentPaths)
+            foreach (var path in parentsArray)
             {
                 var cp = path.Elements.Any() ? commonParent.GetCommonParent(path) : null;
                 if (cp != null)


verify R10 header variable order, corresponding to commit 8e6d7bd

--- src/IxMilia.Dxf.Test/DxfHeaderTests.cs
+++ src/IxMilia.Dxf.Test/DxfHeaderTests.cs
@@ -474,6 +474,135 @@
   1
 AC1015S
 ");
+        }
+
+        [Fact]
+        public void HeaderVariablesMatchOfficialR10Order()
+        {
+            var expectedOrderText = @"
+$ACADVER
+$INSBASE
+$EXTMIN
+$EXTMAX
+$LIMMIN
+$LIMMAX
+$ORTHOMODE
+$REGENMODE
+$FILLMODE
+$QTEXTMODE
+$MIRRTEXT
+$DRAGMODE
+$LTSCALE
+$OSMODE
+$ATTMODE
+$TEXTSIZE
+$TRACEWID
+$TEXTSTYLE
+$CLAYER
+$CELTYPE
+$CECOLOR
+$DIMSCALE
+$DIMASZ
+$DIMEXO
+$DIMDLI
+$DIMRND
+$DIMDLE
+$DIMEXE
+$DIMTP
+$DIMTM
+$DIMTXT
+$DIMCEN
+$DIMTSZ
+$DIMTOL
+$DIMLIM
+$DIMTIH
+$DIMTOH
+$DIMTAD
+$DIMZIN
+$DIMBLK
+$DIMASO
+$DIMSHO
+$DIMPOST
+$DIMAPOST
+$DIMALT
+$DIMALTD
+$DIMALTF
+$DIMLFAC
+$DIMTOFL
+$DIMTVP
+$DIMTIX
+$DIMSOXD
+$DIMSAH
+$DIMBLK1
+$DIMBLK2
+$DIMSTYLE
+$LUNITS
+$LUPREC
+$SKETCHINC
+$FILLETRAD
+$AUNITS
+$AUPREC
+$MENU
+$ELEVATION
+$THICKNESS
+$LIMCHECK
+$BLIPMODE
+$CHAMFERA
+$CHAMFERB
+$SKPOLY
+$TDCREATE
+$TDUPDATE
+$TDINDWG
+$TDUSRTIMER
+$USRTIMER
+$ANGBASE
+$ANGDIR
+$PDMODE
+$PDSIZE
+$PLINEWID
+$COORDS
+$SPLFRAME
+$SPLINETYPE
+$SPLINESEGS
+$ATTDIA
+$ATTREQ
+$HANDLING
+$HANDSEED
+$SURFTAB1
+$SURFTAB2
+$SURFTYPE
+$SURFU
+$SURFV
+$UCSNAME
+$UCSORG
+$UCSXDIR
+$UCSYDIR
+$USERI1
+$USERI2
+$USERI3
+$USERI4
+$USERI5
+$USERR1
+$USERR2
+$USERR3
+$USERR4
+$USERR5
+$WORLDVIEW
+$AXISMODE
+$AXISUNIT
+$FASTZOOM
+$GRIDMODE
+$GRIDUNIT
+$SNAPANG
+$SNAPBASE
+$SNAPISOPAIR
+$SNAPMODE
+$SNAPSTYLE
+$SNAPUNIT
+$VIEWCTR
+$VIEWDIR
+$VIEWSIZE";
+            TestHeaderOrder(expectedOrderText, DxfAcadVersion.R10);
         }

         [Fact]


Fix TTT Sync

Fix TTT Sync

--- 3DSRNGTool/Gen6/TinyTimeline.cs
+++ 3DSRNGTool/Gen6/TinyTimeline.cs
@@ -271,8 +271,18 @@
         private void getshiftedsync(int shift)
         {
             int max = results.Count;
-            for (int i = shift; i < max; i++)
-                results[i - shift].sync = ReferenceList[results[i].HitIndex].Rand2;
+            int idxmax = ReferenceList.Count;
+            int framehit;
+            for (int i = 0; i < max; i++)
+            {
+                framehit = results[i].HitIndex + shift;
+                if (framehit >= idxmax)
+                {
+                    results = results.Take(i).ToList(); // Remove Tail Data
+                    break;
+                }
+                results[i].sync = ReferenceList[framehit].Rand2;
+            }
         }

         private void MarkFS()


cleanup

cleanup

--- src/CodingAlphabet.cs
+++ src/CodingAlphabet.cs
@@ -45,7 +45,6 @@

         Length = length;
         Value = alphabet;
-
         for (short i = 0; i < length; i++)
         {
             Map(alphabet[i], i);


Mark struct as readonly

Mark struct as readonly

--- A-vs-An/A-vs-An-DotNet/AvsAn.cs
+++ A-vs-An/A-vs-An-DotNet/AvsAn.cs
@@ -21,7 +21,7 @@
         // ReSharper disable MemberCanBePrivate.Global
         // ReSharper disable UnusedMember.Global
         //part of public nuget api, usages may be in external code.
-        public struct Result {
+        public readonly struct Result {
             readonly Ratio ratio;
 #pragma warning disable IDE1006 // Naming Styles


修复一个警告。 :wave:

修复一个警告。 :wave:

--- src/ControllerBase.cs
+++ src/ControllerBase.cs
@@ -35,7 +35,7 @@
 {
 	public class ControllerBase<TModel, TConditional, TService> : System.Web.Mvc.Controller
 																  where TModel : class
-																  where TConditional : class, IConditional
+																  where TConditional : class, IModel
 																  where TService : class, IDataService<TModel>
 	{
 		#region 成员字段


Correct URL for material uses

Correct URL for material uses

--- MaterialMonitor/MaterialMonitor.cs
+++ MaterialMonitor/MaterialMonitor.cs
@@ -301,7 +301,7 @@

         private void populateMaterialBlueprints()
         {
-            string data = Net.DownloadString("http://www.mcdee.net/elite/blueprints.json");
+            string data = Net.DownloadString("http://api.eddp.co/_materialuses");
             if (data != null)
             {
                 Dictionary<string, List<Blueprint>> blueprints = JsonConvert.DeserializeObject<Dictionary<string, List<Blueprint>>>(data);


Update IsValueType: System.Enum is not a value type

--- src/DotNet/TypeDef.cs
+++ src/DotNet/TypeDef.cs
@@ -464,7 +464,9 @@
 					return false;
 				if (baseType.TypeName != "ValueType" && baseType.TypeName != "Enum")
 					return false;
-				return baseType.DefinitionAssembly.IsCorLib();
+				if (!baseType.DefinitionAssembly.IsCorLib())
+					return false;
+				return !(FullName == "System.Enum" && DefinitionAssembly.IsCorLib());
 			}
 		}


Fixed assembly properties

Fixed assembly properties

--- MiniMVC/Properties/AssemblyInfo.cs
+++ MiniMVC/Properties/AssemblyInfo.cs
@@ -8,9 +8,9 @@
 [assembly: AssemblyTitle("MiniMVC")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("MiniMVC")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
+[assembly: AssemblyCopyright("Copyright © Mauricio Scheffer 2009-2010")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]


Add TestAttachmentFromByteArray

Add TestAttachmentFromByteArray

--- source/XeroApi.ConsoleTests/Program.cs
+++ source/XeroApi.ConsoleTests/Program.cs
@@ -1,8 +1,8 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
-
+using System.Linq;
+using DevDefined.OAuth.Utility;
 using XeroApi.Model;
 using XeroApi.Model.Reporting;

@@ -10,7 +10,7 @@
 {
     class Program
     {
-        private static readonly string AnyAttachmentFilename = @".\Attachments\Receipt.png";
+        private const string AnyAttachmentFilename = @".\Attachments\Receipt.png";
         private const string TestContactName = "Joe Bloggs (Test)";

         static void Main(string[] args)
@@ -38,10 +38,6 @@
                 Console.WriteLine("Running as a partner application...");
                 ExerciseOrganisation(PartnerApplicationRunner.CreateRepository());
             }
-
-            Console.WriteLine("");
-            Console.WriteLine(" Press Enter to Exit");
-            Console.ReadLine();
         }

         static void ExerciseOrganisation(Repository repository)
@@ -60,24 +56,25 @@
             TestCreatingAndUpdatingContacts(repository);
             TestGetContactsUsingLinq(repository);
             TestFindingCustumersThatAreContacts(repository);
-            TestGetOrganisaitonUsingLinqSingle(repository);
+            TestGetOrganisaitonUsingLinqSingle(repository);
             TestFindingBankAccounts(repository);
             TestFindingTrackingCategories(repository);
             TestFindingItemsUsingLinqSyntax(repository, organisation);
             TestCreatingInvoiceWithValidationErrors(repository);
+            TestAttachmentFromByteArray(repository);
             TestAttachmentsAgainstPurchaseInvoice(repository);

-            // Download a PDF of the first AR invoice in the system
-            var anySalesInvoice = repository.Invoices.First(invoice => invoice.Type == "ACCREC");
-
+            // Download a PDF of the first AR invoice in the system
+            var anySalesInvoice = repository.Invoices.First(invoice => invoice.Type == "ACCREC");
+
             TestDownloadingPrintedInvoicePdf(repository, anySalesInvoice);
             TestFindingInvoicesByContactName(repository, anySalesInvoice.Contact);
-
+
             TestFindingTheSubscriberUser(repository);
             TestCreatingReceiptsForAUser(repository);
             TestGettingAListOfExpenseClaims(repository);
             TestGetAllJournalsWithPagination(repository);
-            TesGettingATrialBalance(repository);
+            TestGettingATrialBalance(repository);
             TestGettingAListOfReports(repository);

             Console.WriteLine("All done!");
@@ -85,13 +82,68 @@

         private static void TestAttachmentsAgainstPurchaseInvoice(Repository repository)
         {
-            var anyPurchasesInvoice = repository.Invoices.FirstOrDefault(it => it.Type == "ACCPAY" && it.Status == "DRAFT")
+            Console.WriteLine("Creating an invoice and loading attachment...");
+
+            var anyPurchasesInvoice = repository.Invoices.FirstOrDefault(it => it.Type == "ACCPAY" && it.Status == "DRAFT")
                 ?? CreateAnyPurchasesInvoice(repository);
-
+
             // Upload an attachment against the invoice
             var newAttachment = repository.Attachments.Create(anyPurchasesInvoice, new FileInfo(AnyAttachmentFilename));

             Console.WriteLine("Attachment {0} was added to invoice {1}", newAttachment.FileName, anyPurchasesInvoice.InvoiceID);
+        }
+
+        private static void TestAttachmentFromByteArray(Repository repository)
+        {
+            Console.WriteLine("Creating an invoice and loading attachment...");
+
+            var anyPurchasesInvoice = CreateAnyPurchasesInvoice(repository);
+
+            byte[] image;
+
+            //create a byte array from the file and use that to upload
+            using (var stream = new FileStream(AnyAttachmentFilename, FileMode.Open))
+            using (var ms = new MemoryStream())
+            {
+                stream.CopyTo(ms);
+                image = ms.ToArray();
+            }
+
+            var info = new FileInfo(AnyAttachmentFilename);
+            var mimeType = MimeTypes.GetMimeType(info);
+
+            var newAttachment = repository.Attachments.Create(anyPurchasesInvoice, new Attachment
+            {
+                Content = image,
+                ContentLength = image.Length,
+                FileName = info.Name,
+                MimeType = mimeType
+            });
+
+            Console.WriteLine("Attachment {0} was added to invoice {1}", newAttachment.FileName,
+                              anyPurchasesInvoice.InvoiceID);
+
+            Console.WriteLine("Finding invoice and saving attachment...");
+
+            var invoice = repository.FindById<Invoice>(anyPurchasesInvoice.InvoiceID.ToString());
+            Attachment attachment = repository.Attachments.GetAttachmentFor(invoice);
+            string attachmentPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
+                                              attachment.FileName);
+
+            var file = new FileInfo(attachmentPath);
+
+            if (file.Exists)
+            {
+                file.Delete();
+            }
+
+            using (FileStream fs = file.OpenWrite())
+            {
+                fs.Write(attachment.Content, 0, attachment.ContentLength);
+            }
+
+            Console.WriteLine("Attachment {0} was retrieved for invoice {1}", newAttachment.FileName,
+                anyPurchasesInvoice.InvoiceID);
         }

         private static Invoice CreateAnyPurchasesInvoice(Repository repository)
@@ -117,7 +169,7 @@
             return repository.Create(invoice);
         }

-        private static void TesGettingATrialBalance(Repository repository)
+        private static void TestGettingATrialBalance(Repository repository)
         {
             // Get a trial balance report (as per http://answers.xero.com/developer/question/36201/)
             Console.WriteLine("Running Trial Balance Report...");


Spiking GoBack fix #2

Spiking GoBack fix #2

--- Miruken.Mvc/NavigateInterceptor.cs
+++ Miruken.Mvc/NavigateInterceptor.cs
@@ -8,6 +8,8 @@

 namespace Miruken.Mvc
 {
+    using Infrastructure;
+
     public class NavigateInterceptor<C> : RealProxy, IRemotingTypeInfo
         where C : class, IController
     {
@@ -37,14 +39,18 @@

             var methodCall = (IMethodCallMessage)msg;
             var method     = methodCall.MethodBase;
+            var args       = methodCall.Args;

             Func<C, object> action = controller =>
             {
+                var m = method;
                 if (_controller == null)
                     _controller = controller;
-                return method.Invoke(controller,
+                else if (controller != _controller)
+                    m = RuntimeHelper.SelectMethod((MethodInfo) method, controller.GetType());
+                return m.Invoke(controller,
                     BindingFlags.Instance | BindingFlags.Public,
-                    null, methodCall.Args, null);
+                    null, args, null);
             };

             try
@@ -53,8 +59,7 @@
                            ? P<INavigate>(_handler).Navigate(action, _style)
                            : action(_controller);

-                return new ReturnMessage(result,
-                    methodCall.Args, methodCall.ArgCount,
+                return new ReturnMessage(result, args, methodCall.ArgCount,
                     methodCall.LogicalCallContext, methodCall);
             }
             catch (TargetInvocationException tex)


Make public a method which was accidentally committed as private.

--- MonoGameUtils/Drawing/Utilities.cs
+++ MonoGameUtils/Drawing/Utilities.cs
@@ -20,7 +20,7 @@
         /// <param name="world">The world matrix that the model should be drawn in.</param>
         /// <param name="view">The view matrix that the model should be drawn in.</param>
         /// <param name="projection">The projection matrix that the model should be drawn in.</param>
-       private static void DrawModel(Model model, Matrix world, Matrix view, Matrix projection)
+       public static void DrawModel(Model model, Matrix world, Matrix view, Matrix projection)
         {
             foreach (ModelMesh mesh in model.Meshes)
             {


Fix for Mono

Fix for Mono

git-svn-id: 61c3ae23f3a6520e9bc357b51591209af2ede9d8@695 45b04e34-05f1-4d87-a130-40a8491d5c8b

--- Mosa/DeviceSystem/PCI/PCIDevice.cs
+++ Mosa/DeviceSystem/PCI/PCIDevice.cs
@@ -212,7 +212,7 @@
 		/// </summary>
 		public void EnableDevice()
 		{
-			CommandRegister = (ushort)(CommandRegister | (((ioPortRegionCount > 0) ? PCICommand.IO : 0) | PCICommand.Master | ((memoryRegionCount > 0) ? PCICommand.Memort : 0)));
+            CommandRegister = (ushort)(CommandRegister | (((ioPortRegionCount > 0) ? PCICommand.IO : (ushort)0) | PCICommand.Master | ((memoryRegionCount > 0) ? PCICommand.Memort : (ushort)0)));
 		}

 		/// <summary>


Forwardクラスにregionを追加

Forwardクラスにregionを追加

--- MusicXMLUtils/Structure/Forward.cs
+++ MusicXMLUtils/Structure/Forward.cs
@@ -38,6 +38,7 @@
     [XmlType("forward")]
     public class Forward
     {
+        #region -- Public Properties --
         [XmlElement("duration")]
         public decimal Duration { get; set; }

@@ -52,5 +53,6 @@

         [XmlElement("staff", DataType = "positiveInteger")]
         public string Staff { get; set; }
+        #endregion
     }
 }