Fixed bug in applying global route constraints -- when more than one url parameter matches the specified regex, only the first one matched has the constraint applied. This behavior is incorrect and now fixed.

--- src/AttributeRouting/Framework/RouteBuilder.cs
+++ src/AttributeRouting/Framework/RouteBuilder.cs
@@ -115,8 +115,7 @@
             constraints.Add("httpMethod", new RestfulHttpMethodConstraint(routeSpec.HttpMethod));

             // Attribute-based constraints
-            foreach (
-                var constraintAttribute in routeSpec.ConstraintAttributes.Where(c => !constraints.ContainsKey(c.Key)))
+            foreach (var constraintAttribute in routeSpec.ConstraintAttributes.Where(c => !constraints.ContainsKey(c.Key)))
                 constraints.Add(constraintAttribute.Key, constraintAttribute.Constraint);

             var detokenizedUrl = DetokenizeUrl(CreateRouteUrl(routeSpec));
@@ -126,8 +125,8 @@
             foreach (var defaultConstraint in _configuration.DefaultRouteConstraints)
             {
                 var pattern = defaultConstraint.Key;
-                var urlParameterName = urlParameterNames.FirstOrDefault(n => Regex.IsMatch(n, pattern));
-                if (urlParameterName.HasValue())
+                var matchedUrlParameterNames = urlParameterNames.Where(n => Regex.IsMatch(n, pattern));
+                foreach (var urlParameterName in matchedUrlParameterNames.Where(n => !constraints.ContainsKey(n)))
                     constraints.Add(urlParameterName, defaultConstraint.Value);
             }


cosmetic

cosmetic

--- src/AutoMapper/Execution/TypeMapPlanBuilder.cs
+++ src/AutoMapper/Execution/TypeMapPlanBuilder.cs
@@ -115,7 +115,7 @@
         {
             var newDestFunc = ToType(CreateNewDestinationFunc(out constructorMapping), _typeMap.DestinationTypeToUse);

-            var getDest = _typeMap.DestinationTypeToUse.GetTypeInfo().IsValueType
+            var getDest = _typeMap.DestinationTypeToUse.IsValueType()
                 ? newDestFunc
                 : Coalesce(_initialDestination, newDestFunc);


cosmetic

cosmetic

--- src/AutoMapper/Execution/TypeMapPlanBuilder.cs
+++ src/AutoMapper/Execution/TypeMapPlanBuilder.cs
@@ -41,55 +41,14 @@
         public LambdaExpression CreateMapperLambda()
         {
             if(_typeMap.SourceType.IsGenericTypeDefinition() || _typeMap.DestinationTypeToUse.IsGenericTypeDefinition())
+            {
                 return null;
-
-            if(_typeMap.Substitution != null)
-            {
-                return Lambda(_typeMap.Substitution.ReplaceParameters(_source, _initialDestination, _context), _source,
-                    _initialDestination, _context);
-            }
-
-            if(_typeMap.TypeConverterType != null)
-            {
-                Type type;
-                if(_typeMap.TypeConverterType.IsGenericTypeDefinition())
-                {
-                    var genericTypeParam = _typeMap.SourceType.IsGenericType()
-                        ? _typeMap.SourceType.GetTypeInfo().GenericTypeArguments[0]
-                        : _typeMap.DestinationTypeToUse.GetTypeInfo().GenericTypeArguments[0];
-                    type = _typeMap.TypeConverterType.MakeGenericType(genericTypeParam);
-                }
-                else type = _typeMap.TypeConverterType;
-
-                // (src, dest, ctxt) => ((ITypeConverter<TSource, TDest>)ctxt.Options.CreateInstance<TypeConverterType>()).ToType(src, ctxt);
-                var converterInterfaceType = typeof(ITypeConverter<,>).MakeGenericType(_typeMap.SourceType,
-                    _typeMap.DestinationTypeToUse);
-                return Lambda(
-                    Call(
-                        ToType(
-                            Call(
-                                MakeMemberAccess(_context, typeof(ResolutionContext).GetDeclaredProperty("Options")),
-                                typeof(IMappingOperationOptions).GetDeclaredMethod("CreateInstance")
-                                    .MakeGenericMethod(type)
-                                ),
-                            converterInterfaceType),
-                        converterInterfaceType.GetDeclaredMethod("Convert"),
-                        _source, _initialDestination, _context
-                        ),
-                    _source, _initialDestination, _context);
-            }
-
-            if(_typeMap.CustomMapper != null)
-            {
-                return Lambda(_typeMap.CustomMapper.ReplaceParameters(_source, _initialDestination, _context), _source,
-                    _initialDestination, _context);
-            }
-
-            if(_typeMap.CustomProjection != null)
-            {
-                return Lambda(_typeMap.CustomProjection.ReplaceParameters(_source), _source, _initialDestination, _context);
-            }
-
+            }
+            var customExpression = TypeConverterMapper() ?? _typeMap.Substitution ?? _typeMap.CustomMapper ?? _typeMap.CustomProjection;
+            if(customExpression != null)
+            {
+                return Lambda(customExpression.ReplaceParameters(_source, _initialDestination, _context), _source, _initialDestination, _context);
+            }
             bool constructorMapping;

             var destinationFunc = CreateDestinationFunc(out constructorMapping);
@@ -100,7 +59,43 @@

             var checkContext = CheckContext(_typeMap, _context);
             var lambaBody = (checkContext != null) ? new[] { checkContext, mapperFunc } : new[] { mapperFunc };
+
             return Lambda(Block(new[] { _destination }, lambaBody), _source, _initialDestination, _context);
+        }
+
+        private LambdaExpression TypeConverterMapper()
+        {
+            if(_typeMap.TypeConverterType == null)
+            {
+                return null;
+            }
+            Type type;
+            if(_typeMap.TypeConverterType.IsGenericTypeDefinition())
+            {
+                var genericTypeParam = _typeMap.SourceType.IsGenericType()
+                    ? _typeMap.SourceType.GetTypeInfo().GenericTypeArguments[0]
+                    : _typeMap.DestinationTypeToUse.GetTypeInfo().GenericTypeArguments[0];
+                type = _typeMap.TypeConverterType.MakeGenericType(genericTypeParam);
+            }
+            else
+            {
+                type = _typeMap.TypeConverterType;
+            }
+            // (src, dest, ctxt) => ((ITypeConverter<TSource, TDest>)ctxt.Options.CreateInstance<TypeConverterType>()).ToType(src, ctxt);
+            var converterInterfaceType = typeof(ITypeConverter<,>).MakeGenericType(_typeMap.SourceType, _typeMap.DestinationTypeToUse);
+            return Lambda(
+                Call(
+                    ToType(
+                        Call(
+                            MakeMemberAccess(_context, typeof(ResolutionContext).GetDeclaredProperty("Options")),
+                            typeof(IMappingOperationOptions).GetDeclaredMethod("CreateInstance")
+                                .MakeGenericMethod(type)
+                            ),
+                        converterInterfaceType),
+                    converterInterfaceType.GetDeclaredMethod("Convert"),
+                    _source, _initialDestination, _context
+                    ),
+                _source, _initialDestination, _context);
         }

         public static ConditionalExpression CheckContext(TypeMap typeMap, Expression context)


upgrade version to 2.8.4 the main change is to fix an important issue #69

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


Reverted change because it broke the build

--- src/Compilers/CSharp/Test/Emit/PDB/PDBTests.cs
+++ src/Compilers/CSharp/Test/Emit/PDB/PDBTests.cs
@@ -2955,7 +2955,7 @@
     {
         string str = null;
         bool isEmpty = string.IsNullOrEmpty(str);
-        // isEmpty is always true here, so it should never go through this if statement.
+        // isEmpty is always true here, so it should never go thru this if statement.
         if (!isEmpty)
         {
             throw new Exception();


Remove unused usings.

Remove unused usings.

--- src/Faithlife.Parsing/Parser-Trim.cs
+++ src/Faithlife.Parsing/Parser-Trim.cs
@@ -1,7 +1,4 @@
-using System.Collections.Generic;
-using System.Linq;
-
-namespace Faithlife.Parsing
+namespace Faithlife.Parsing
 {
 	public static partial class Parser
 	{


Print out some rudimentary dotprop metadata

--- src/DotVVM.Compiler/DefaultCompilerExecutor.cs
+++ src/DotVVM.Compiler/DefaultCompilerExecutor.cs
@@ -1,7 +1,9 @@
 using System;
+using System.Collections.Generic;
 using System.IO;
 using System.Linq;
 using System.Reflection;
+using System.Text;
 using DotVVM.Framework.Binding;
 using DotVVM.Framework.Compilation.ControlTree;
 using DotVVM.Framework.Compilation.Static;
@@ -40,7 +42,7 @@
             var configuration = DotvvmConfiguration.CreateInternal(_ => {});
             // NB: This forces DotVVM to register all properties on all types.
             _ = configuration.ServiceProvider.GetRequiredService<IControlResolver>();
-            var types = assembly.GetTypes().OrderBy(t => t.FullName).ToArray();
+            var types = assembly.GetTypes().OrderBy(t => t.Name).ToArray();
             foreach (var type in types)
             {
                 var props = DotvvmProperty.ResolveProperties(type)
@@ -49,10 +51,32 @@
                     .ToArray();
                 if (props.Length != 0)
                 {
-                    Console.WriteLine(type.FullName);
+                    Console.WriteLine(type.Name);
                     foreach(var prop in props)
                     {
-                        Console.WriteLine($"\t{prop.Name}");
+                        var info = new List<string>();
+                        info.Add($"type={prop.PropertyType.Name}");
+
+                        if (prop.IsBindingProperty)
+                        {
+                            info.Add("binding");
+                        }
+                        if (prop.IsVirtual)
+                        {
+                            info.Add("virtual");
+                        }
+                        if (prop.DataContextChangeAttributes.Length != 0
+                            || prop.DataContextManipulationAttribute is object)
+                        {
+                            info.Add("changed-context");
+                        }
+
+                        Console.Write($"\t{prop.Name}");
+                        if (info.Count != 0)
+                        {
+                            Console.Write($" [{string.Join(", ", info)}]");
+                        }
+                        Console.WriteLine();
                     }
                 }
             }


fix bug -infinite loop with the asynccollection and the StartReadStreamPoller.

this code need more refactor.

--- src/KafkaNetClient/KafkaTcpSocket.cs
+++ src/KafkaNetClient/KafkaTcpSocket.cs
@@ -156,6 +156,7 @@
             while (_disposeToken.IsCancellationRequested == false)
             {
                 //block here until we can get connections then start loop pushing data through network stream
+                bool hasException = false;
                 var netStreamTask = GetStreamAsync();
                 try
                 {
@@ -163,7 +164,7 @@

                     if (_disposeToken.IsCancellationRequested)
                     {
-                        SetDisposeExceptonToPenndingTasks();
+                        await SetDisposeExceptonToPenndingTasks();
                         if (OnServerDisconnected != null) OnServerDisconnected();
                         return;
                     }
@@ -172,10 +173,14 @@
                 catch (Exception ex)
                 {
                     _log.ErrorFormat("Exception occured in Socket handler task.  Exception: {0}", ex);
-
-                    SetDisposeExceptonToPenndingTasks(new SocketException());
+                    hasException = true;
+                }
+                if (hasException)
+                {
+                    await SetDisposeExceptonToPenndingTasks(new SocketException());
                     if (OnServerDisconnected != null) OnServerDisconnected();
                 }
+
                 try
                 {
                     var netStream = await netStreamTask.ConfigureAwait(false);
@@ -190,7 +195,7 @@
             }
         }

-        private void SetDisposeExceptonToPenndingTasks(Exception exception = null)
+        private async Task SetDisposeExceptonToPenndingTasks(Exception exception = null)
         {
             var disposeException = new ObjectDisposedException("Object is disposing.");
             if (exception == null)
@@ -202,8 +207,18 @@
             else
             {
                 _log.WarnFormat("KafkaTcpSocket not able to connect cancel all PenndingTasks.");
-                _sendTaskQueue.DrainAndApply(t => t.Tcp.TrySetException(exception));
-                _readTaskQueue.DrainAndApply(t => t.Tcp.TrySetException(exception));
+                int pendingSendTasksCount = _sendTaskQueue.Count;
+                if (pendingSendTasksCount > 0)
+                {
+                    var pendingSendTasks = await _sendTaskQueue.TakeAsync(pendingSendTasksCount, TimeSpan.FromMinutes(2), new CancellationToken());
+                    pendingSendTasks.ForEach(t => t.Tcp.TrySetException(exception));
+                }
+                int pendingReadTasksCount = _readTaskQueue.Count;
+                if (pendingReadTasksCount > 0)
+                {
+                    var pendingReadTasks = await _readTaskQueue.TakeAsync(pendingReadTasksCount, TimeSpan.FromMinutes(2), new CancellationToken());
+                    pendingReadTasks.ForEach(t => t.Tcp.TrySetException(exception));
+                }
             }
         }

@@ -220,6 +235,7 @@
             var sendTask = ProcessNetworkstreamTasksReadTask(netStream);
             await Task.WhenAny(readTask, sendTask);
             if (_disposeToken.IsCancellationRequested) return;
+
             await ThrowTaskExceptionIfFaulted(readTask);
             await ThrowTaskExceptionIfFaulted(sendTask);
         }


Fix designer crash; turns out it actually calls dispose in some cases.

--- DesktopApplicationInsights/TelemetryForm.cs
+++ DesktopApplicationInsights/TelemetryForm.cs
@@ -87,7 +87,7 @@

         private void LogPageView()
         {
-            if (!_viewLogged)
+            if (!this.DesignMode && !_viewLogged)
             {
                 _telemetryData.Duration = DateTime.UtcNow - _openTime;
                 this.TelemetryClient.TrackPageView(_telemetryData);


Make Properties static

Make Properties static

--- Distribox/Distribox.CommonLib/Properties.cs
+++ Distribox/Distribox.CommonLib/Properties.cs
@@ -2,7 +2,7 @@

 namespace Distribox.CommonLib
 {
-	public class Properties
+	public static class Properties
 	{
 		public const string PathSep = "/";
 		public const string MetaFolder = ".Distribox";


Small bug fix

Small bug fix

--- src/LifeLogger/LifeLogger/Program.cs
+++ src/LifeLogger/LifeLogger/Program.cs
@@ -28,12 +28,6 @@
             Application.SetCompatibleTextRenderingDefault(false);
             RegisterMediators();
             Application.Run(GetMainFormFromMediators());
-
-
-            TextReader textReader = new StreamReader("settings.xml");
-            Settings = (LoggerSettings)XmlSer.Deserialize(textReader);
-            textReader.Close();
-
         }

         private static void RegisterMediators()


ReflectionUtils.IsRecordType does not check for IEnumerable.

--- src/Mapster/Utils/ReflectionUtils.cs
+++ src/Mapster/Utils/ReflectionUtils.cs
@@ -165,10 +165,6 @@

         public static bool IsRecordType(this Type type)
         {
-            //not collection
-            if (type.IsCollection())
-                return false;
-
             //not nullable
             if (type.IsNullable())
                 return false;


[ReignOfKings] Should fix plugin chat commands not working

--- Games/Unity/Oxide.Game.ReignOfKings/ReignOfKingsCore.cs
+++ Games/Unity/Oxide.Game.ReignOfKings/ReignOfKingsCore.cs
@@ -258,7 +258,7 @@
             if (blockedSpecific != null || blockedCovalence != null) return true;

             // Is it a chat command?
-            if (message[0] != '/') return null;
+            if (str[0] != '/') return null;

             // Is it a covalance command?
             if (Covalence.CommandSystem.HandleChatMessage(iplayer, str)) return true;


Use WaitOne overload that is available pre SP1.

--- src/MbUnit/MbUnit/Framework/Retry.cs
+++ src/MbUnit/MbUnit/Framework/Retry.cs
@@ -15,12 +15,12 @@

 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Text;
+using System.Threading;
 using Gallio.Common;
+using Gallio.Framework.Assertions;
 using Gallio.Framework.Pattern;
-using Gallio.Framework.Assertions;
-using System.Threading;
-using System.Diagnostics;

 namespace MbUnit.Framework
 {
@@ -335,7 +335,7 @@
                 try
                 {
                     return ((condition != null) && condition())
-                        || (waitHandle != null) && (waitHandle.WaitOne(0));
+                        || (waitHandle != null) && (waitHandle.WaitOne(0, false));
                 }
                 catch (Exception exception)
                 {


[Fix] SharedConnection is now disposable to close RbMQ connection

--- src/MerQure.RbMQ/SharedConnection.cs
+++ src/MerQure.RbMQ/SharedConnection.cs
@@ -8,7 +8,7 @@
     /// <summary>
     /// Must be registered as a singleton
     /// </summary>
-    public class SharedConnection
+    public class SharedConnection : IDisposable
     {
         private readonly MerQureConnection _config;
         private readonly Lazy<IConnection> _currentConnection;
@@ -31,5 +31,18 @@
             };
             return connectionFactory.CreateConnection();
         }
+
+        public void Dispose()
+        {
+            Dispose(true);
+        }
+
+        protected virtual void Dispose(bool dispose)
+        {
+            if (_currentConnection.IsValueCreated)
+            {
+                _currentConnection.Value.Dispose();
+            }
+        }
     }
 }


Improve packages command performance

Improve packages command performance

--- Infinni.Node/Packaging/NuGetPackageRepositoryManager.cs
+++ Infinni.Node/Packaging/NuGetPackageRepositoryManager.cs
@@ -1,5 +1,7 @@
 using System;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Threading;
@@ -143,7 +145,6 @@
             return GetPackageContent(packageIdentity, installActions.Select(i => i.PackageIdentity).ToList());
         }

-
         /// <summary>
         /// Возвращает список доступных в источниках пакетов по части ID.
         /// </summary>
@@ -151,18 +152,24 @@
         /// <param name="allowPrereleaseVersions">Разрешен ли поиск среди предрелизных версий.</param>
         public Task<IEnumerable<IPackage>> FindAvailablePackages(string searchTerm, bool allowPrereleaseVersions)
         {
-            var findPackage = new List<IPackage>();
-
-            foreach (var source in _packageSources)
-            {
-                var repository = (IPackageRepository) new DataServicePackageRepository(new Uri(source));
-                var packages = repository.Search(searchTerm, allowPrereleaseVersions)
-                                         .Where(p => p.IsAbsoluteLatestVersion)
-                                         .OrderBy(p => p.Id)
-                                         .AsEnumerable();
-
-                findPackage.AddRange(packages);
-            }
+            var stopwatch = Stopwatch.StartNew();
+            var findPackage = new ConcurrentBag<IPackage>();
+
+            Parallel.ForEach(_packageSources, (s, state, arg3) =>
+                             {
+                                 var repository = (IPackageRepository) new DataServicePackageRepository(new Uri(s));
+                                 var packages = repository.Search(searchTerm, allowPrereleaseVersions)
+                                                          .Where(p => p.IsAbsoluteLatestVersion)
+                                                          .OrderBy(p => p.Id)
+                                                          .AsEnumerable();
+
+                                 foreach (var package in packages)
+                                 {
+                                     findPackage.Add(package);
+                                 }
+                             });
+
+            Console.WriteLine(stopwatch.ElapsedMilliseconds);

             return Task.FromResult(findPackage.AsEnumerable());
         }


tweak to autocomplete.. just ensure thread is not running on handle destroy, instead of removing func call

--- EDDiscovery/Controls/AutoCompleteTextBox.cs
+++ EDDiscovery/Controls/AutoCompleteTextBox.cs
@@ -69,20 +69,16 @@

         private void AutoCompleteTextBox_HandleDestroyed(object sender, EventArgs e)
         {
-            RemoveAutoCompletor();      // make sure auto completor is inert, else we get exceptions
-        }
-
-        public void RemoveAutoCompletor()       // if closing on us.. call before exitt
-        {
-            waitforautotimer.Stop();
-            restartautocomplete = false;
-
-            if (ThreadAutoComplete != null && ThreadAutoComplete.IsAlive)
-            {
-                ThreadAutoComplete.Join();
-            }
-
-            func = null;
+            if (func != null)
+            {
+                waitforautotimer.Stop();
+                restartautocomplete = false;
+
+                if (ThreadAutoComplete != null && ThreadAutoComplete.IsAlive)
+                {
+                    ThreadAutoComplete.Join();
+                }
+            }
         }

         protected void TextChangeEventHandler(object sender, EventArgs e)


Review.

Review.

--- ExRam.Gremlinq.Core/Queries/GremlinQuery.cs
+++ ExRam.Gremlinq.Core/Queries/GremlinQuery.cs
@@ -837,15 +837,12 @@
             var stepsArray = GetStepsForKeys(keys)
                 .ToArray();

-            switch (stepsArray.Length)
-            {
-                case 0:
-                    throw new ExpressionNotSupportedException();
-                case 1:
-                    return AddStepWithObjectTypes<TValue>(stepsArray[0], QuerySemantics.None);
-                default:
-                    return AddStepWithObjectTypes<TValue>(new UnionStep(stepsArray.Select(step => Anonymize().AddStep(step, QuerySemantics.None))), QuerySemantics.None);
-            }
+            return stepsArray.Length switch
+            {
+                0 => throw new ExpressionNotSupportedException(),
+                1 => AddStepWithObjectTypes<TValue>(stepsArray[0], QuerySemantics.None),
+                _ => AddStepWithObjectTypes<TValue>(new UnionStep(stepsArray.Select(step => Anonymize().AddStep(step, QuerySemantics.None))), QuerySemantics.None)
+            };
         }

         private GremlinQuery<TValue, object, object, object, object, object> ValuesForProjections<TValue>(IEnumerable<LambdaExpression> projections) => ValuesForKeys<TValue>(GetKeys(projections));
@@ -914,7 +911,7 @@
             }
             else
             {
-                if (expression.TryToGremlinExpression(parameter) is TerminalGremlinExpression terminal)
+                if (expression.TryToGremlinExpression(parameter) is { } terminal)
                 {
                     return Where(terminal);
                 }


Release: 2.4.0

Release: 2.4.0

--- Resources/SolutionAssemblyInfo.cs
+++ Resources/SolutionAssemblyInfo.cs
@@ -2,7 +2,7 @@
 using System.Runtime.CompilerServices;

 // This is the real version number, used in NuGet packages and for display purposes.
-[assembly: AssemblyFileVersion("2.3.0")]
+[assembly: AssemblyFileVersion("2.4.0")]

 // Only use major version here, with others kept at zero, for correct assembly binding logic.
 [assembly: AssemblyVersion("2.0.0")]


OpenGL.Terminal no longer tries to render a null Bitmap.

--- Roton.WinForms.OpenGL/Terminal.cs
+++ Roton.WinForms.OpenGL/Terminal.cs
@@ -163,7 +163,10 @@
             displayTimer.Enabled = true;
         }

-        private void GlGenerateTexture() {
+        private void GlGenerateTexture()
+        {
+            if (Bitmap == null) return;
+
             var glNewTexture = GL.GenTexture();

             BitmapData fbData = Bitmap.LockBits(new Rectangle(0, 0, Bitmap.Width, Bitmap.Height), ImageLockMode.ReadOnly, WinPixelFormat.Format32bppArgb);
@@ -183,10 +186,14 @@
             if(!_glReady) return;

             GL.Clear(ClearBufferMask.ColorBufferBit);
+
+            // Don't draw anything if the Bitmap is null.
+            if(Bitmap == null) return;
+
+            GlGenerateTexture();
+
             GL.MatrixMode(MatrixMode.Modelview);
             GL.LoadIdentity();
-
-            GlGenerateTexture();

             GL.Begin(BeginMode.Quads);
             GL.TexCoord2(0.0f, 0.0f); GL.Vertex2(0.0f, 0.0f);


Fixed issue with orphan StreamListener

Fixed issue with orphan StreamListener

--- SS.Integration.Adapter/Adapter.cs
+++ SS.Integration.Adapter/Adapter.cs
@@ -461,6 +461,7 @@
                     _logger.WarnFormat("{0} was disconnected from stream but has status={1}", resource, resource.MatchStatus);
                     RemoveAndStopListener(resource.Id);
                     AddResourceToCreationQueue(resource);
+                    return;
                 }
                 else
                 {


CP-10824: Supp Pack installation through XenCenter: Removed comment

Signed-off-by: Mihaela Stoica <be95049f8e30d921fc7e2579c00c48bd84c40606@citrix.com>

--- XenModel/XenAPI-Extensions/Host.cs
+++ XenModel/XenAPI-Extensions/Host.cs
@@ -1519,7 +1519,7 @@
         {
             get
             {
-                return Helpers.CreamOrGreater(Connection);  // TODO: Replace with CreamOrGreater
+                return Helpers.CreamOrGreater(Connection);
             }
         }
         #endregion


[WorkstationPorts] Reserve port range for ggp ssh sync

GitOrigin-RevId: fc55fa2bcc85f6e939a0fdbdc4394b8ea394428a

--- YetiCommon/YetiWorkStationPorts.cs
+++ YetiCommon/YetiWorkStationPorts.cs
@@ -56,6 +56,10 @@
         public const int SDK_PROXY = 44448;
         public const int SDK_PROXY_WEB = 44449;

+        // Reserve ports 44450-44459 for ggp_sync.
+        public const int GGP_RSYNC_FIRST = 44450;
+        public const int GGP_RSYNC_LAST = 44459;
+
         // Reserve ports 27300, 38920 for rgp and renderdoc.
         public const int RGP_LOCAL = 27300;
         public const int RENDERDOC_LOCAL = 38920;


Develop

Develop

--- ZWave4Net/Communication/Message.cs
+++ ZWave4Net/Communication/Message.cs
@@ -74,6 +74,23 @@

         public override string ToString()
         {
+            if (Function == Communication.Function.ApplicationCommandHandler)
+            {
+                return string.Format($"{Header}, {Type}, {Function}, {ReceiveStatus}, Node: {NodeID}, {Command}");
+            }
+
+            if (Type == MessageType.Request && Function == Communication.Function.SendData)
+            {
+                if (Received)
+                {
+                    return string.Format($"{Header}, {Type}, {Function}, CallbackID: {CallbackID}, {TransmissionState}");
+                }
+                else
+                {
+                    return string.Format($"{Header}, {Type}, {Function}, Node: {NodeID}, {Command}, CallbackID: {CallbackID}");
+                }
+            }
+
             if (Header == FrameHeader.SOF)
             {
                 var payload = Payload != null ? BitConverter.ToString(Payload) : null;
@@ -146,13 +163,13 @@
             switch (header)
             {
                 case FrameHeader.ACK:
-                    Platform.LogMessage(LogLevel.Debug, string.Format($"Received: {buffer[0]}"));
+                    Platform.LogMessage(LogLevel.Debug, string.Format($"Receiving: {buffer[0]}"));
                     return Message.Acknowledgment;
                 case FrameHeader.NAK:
-                    Platform.LogMessage(LogLevel.Debug, string.Format($"Received: {buffer[0]}"));
+                    Platform.LogMessage(LogLevel.Debug, string.Format($"Receiving: {buffer[0]}"));
                     return Message.NegativeAcknowledgment;
                 case FrameHeader.CAN:
-                    Platform.LogMessage(LogLevel.Debug, string.Format($"Received: {buffer[0]}"));
+                    Platform.LogMessage(LogLevel.Debug, string.Format($"Receiving: {buffer[0]}"));
                     return Message.Cancel;
             }

@@ -168,7 +185,7 @@
                 var function = (Function)buffer[3];
                 var payload = buffer.Skip(4).Take(length - 3).ToArray();

-                Platform.LogMessage(LogLevel.Debug, string.Format($"Received: {BitConverter.ToString(buffer.ToArray())}"));
+                Platform.LogMessage(LogLevel.Debug, string.Format($"Receiving: {BitConverter.ToString(buffer.ToArray())}"));

                 if (buffer.Skip(1).Take(buffer.Length - 2).Aggregate((byte)0xFF, (total, next) => (byte)(total ^ next)) != buffer[buffer.Length - 1])
                     throw new ChecksumException();


Version bump v1.6.0

Version bump v1.6.0

--- FBExtendedEvents/Properties/AssemblyInfo.cs
+++ FBExtendedEvents/Properties/AssemblyInfo.cs
@@ -19,5 +19,5 @@
 [assembly: AssemblyConfiguration("Release")]
 #endif

-[assembly: AssemblyVersion("1.4.*")]
-[assembly: AssemblyFileVersion("1.4.0.0")]
+[assembly: AssemblyVersion("1.6.*")]
+[assembly: AssemblyFileVersion("1.6.0.0")]


Check GameId on achievement callbacks

Check GameId on achievement callbacks

--- Facepunch.Steamworks/Client/Achievements.cs
+++ Facepunch.Steamworks/Client/Achievements.cs
@@ -98,6 +98,7 @@
         private void UserStatsReceived( UserStatsReceived_t stats, bool isError )
         {
             if ( isError ) return;
+            if ( stats.GameID != client.AppId ) return;

             Refresh();

@@ -107,6 +108,7 @@
         private void UserStatsStored( UserStatsStored_t stats, bool isError )
         {
             if ( isError ) return;
+            if ( stats.GameID != client.AppId ) return;

             Refresh();


correcting UiAnchor canvaas render type logic

--- Scripts/Components/UI/UiAnchor.cs
+++ Scripts/Components/UI/UiAnchor.cs
@@ -31,7 +31,7 @@
                 return;
             }

-            if (_canvas.renderMode != RenderMode.WorldSpace) {
+            if (_canvas.renderMode != RenderMode.ScreenSpaceOverlay) {
                 Vector2 canvasSize = ((RectTransform)_canvas.transform).sizeDelta;
                 Vector2 canvasOffset = canvasSize / 2.0f;
                 Vector2 viewportPoint = _canvas.worldCamera.WorldToViewportPoint(Anchor.position + WorldOffset);


BOM disabled by default on WS-target

BOM disabled by default on WS-target

--- src/NLog/Targets/WebServiceTarget.cs
+++ src/NLog/Targets/WebServiceTarget.cs
@@ -81,6 +81,8 @@
         {
             this.Protocol = WebServiceProtocol.Soap11;
             this.Encoding = Encoding.UTF8;
+            //BOM give some issues on encoding
+            this.IncludeBOM = false;
         }

         /// <summary>


Make DebuggerSession.TargetExited more strongly typed.

--- Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
+++ Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
@@ -97,7 +97,7 @@
 		/// <summary>
 		/// Raised when the debugged process exits
 		/// </summary>
-		public event EventHandler TargetExited;
+		public event EventHandler<TargetEventArgs> TargetExited;

 		/// <summary>
 		/// Raised when an exception for which there is a catchpoint is thrown
@@ -1040,9 +1040,7 @@
 					IsConnected = false;
 					HasExited = true;
 				}
-				EventHandler handler = TargetExited;
-				if (handler != null)
-					handler (this, args);
+				evnt = TargetExited;
 				break;
 			case TargetEventType.TargetHitBreakpoint:
 				lock (slock) {


Properly attach reinserted breakpoints. Improved error reporting.

--- Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
+++ Mono.Debugging/Mono.Debugging.Client/DebuggerSession.cs
@@ -546,6 +546,8 @@
 		{
 			try {
 				var eventInfo = OnInsertBreakEvent (be);
+				if (eventInfo == null)
+					throw new InvalidOperationException ("OnInsertBreakEvent can't return a null value. If the breakpoint can't be bound or is invalid, a BreakEventInfo with the corresponding status must be returned");
 				lock (breakpoints) {
 					breakpoints [be] = eventInfo;
 				}
@@ -1116,17 +1118,21 @@
 		void RetryEventBind (BreakEventInfo binfo)
 		{
 			// Try inserting the breakpoint again
+			BreakEvent be = binfo.BreakEvent;
 			try {
-				binfo = OnInsertBreakEvent (binfo.BreakEvent);
+				binfo = OnInsertBreakEvent (be);
+				if (binfo == null)
+					throw new InvalidOperationException ("OnInsertBreakEvent can't return a null value. If the breakpoint can't be bound or is invalid, a BreakEventInfo with the corresponding status must be returned");
 				lock (breakpoints) {
-					breakpoints [binfo.BreakEvent] = binfo;
-				}
+					breakpoints [be] = binfo;
+				}
+				binfo.AttachSession (this, be);
 			} catch (Exception ex) {
-				Breakpoint bp = binfo.BreakEvent as Breakpoint;
+				Breakpoint bp = be as Breakpoint;
 				if (bp != null)
 					OnDebuggerOutput (false, "Could not set breakpoint at location '" + bp.FileName + ":" + bp.Line + " (" + ex.Message + ")\n");
 				else
-					OnDebuggerOutput (false, "Could not set catchpoint for exception '" + ((Catchpoint)binfo.BreakEvent).ExceptionName + "' (" + ex.Message + ")\n");
+					OnDebuggerOutput (false, "Could not set catchpoint for exception '" + ((Catchpoint)be).ExceptionName + "' (" + ex.Message + ")\n");
 				HandleException (ex);
 			}
 		}


Add PointUtility.WithOffset

Add PointUtility.WithOffset

--- GoldenAnvil.Utility.Windows/PointUtility.cs
+++ GoldenAnvil.Utility.Windows/PointUtility.cs
@@ -5,6 +5,11 @@
 {
 	public static class PointUtility
 	{
+		public static Point WithOffset(this Point point, Point that)
+		{
+			return new Point(point.X + that.X, point.Y + that.Y);
+		}
+
 		public static double DistanceTo(this Point point, Point target)
 		{
 			var dx = point.X - target.X;


Fixed .defprefix, closes #1837

Fixed .defprefix, closes #1837

--- NadekoBot.Core/Modules/Administration/PrefixCommands.cs
+++ NadekoBot.Core/Modules/Administration/PrefixCommands.cs
@@ -35,7 +35,7 @@

             [NadekoCommand, Usage, Description, Aliases]
             [OwnerOnly]
-            public async Task DefPrefix([Remainder]string prefix)
+            public async Task DefPrefix([Remainder]string prefix = null)
             {
                 if (string.IsNullOrWhiteSpace(prefix))
                 {


Add log

Add log

--- PA.Utilities.InnoSetupTask/PreprocessInnoSetupScript.cs
+++ PA.Utilities.InnoSetupTask/PreprocessInnoSetupScript.cs
@@ -108,6 +108,7 @@
             };

 			logger.LogInfo("Configuration is " + Configuration);
+			logger.LogInfo("Platform is " + Platform);

             var s = new SolutionProcessor(SolutionPath);
             var p = (Configuration != null && Platform != null) ? new ProjectProcessor(ProjectPath, Configuration, Platform) : new ProjectProcessor(ProjectPath);


* ShapefileWriter -- Write to the SHX file

--- ShapefileSharp/ShapefileWriter.cs
+++ ShapefileSharp/ShapefileWriter.cs
@@ -101,13 +101,16 @@
             ShpWriter.BaseStream.Position = shpStreamPositionAfterRecord;

-            //TODO: Write to the SHX file...

             var shxRecord = new ShxRecord()
             {
                 Offset = shpRecordOffset,
-                ContentLength = WordCount.FromBytes((int)ShpStream.Position) - shpRecordOffset
+                ContentLength = WordCount.FromBytes((int)ShpWriter.BaseStream.Position) - shpRecordOffset
             };
+
+            var shxRecordField = new ShxRecordField(WordCount.FromBytes(ShxWriter.BaseStream.Position));
+            shxRecordField.Write(ShxWriter, shxRecord);
+

             RecordNumber++;


* ShapefileWriter -- Add ShpFilePath, ShxFilePath properties

--- ShapefileSharp/ShapefileWriter.cs
+++ ShapefileSharp/ShapefileWriter.cs
@@ -25,6 +25,34 @@
             };
         }

+        #region IDisposable Support
+        private bool disposedValue = false; // To detect redundant calls
+
+        void Dispose(bool disposing)
+        {
+            if (!disposedValue)
+            {
+                if (disposing)
+                {
+                    //TODO: Write headers to files...
+
+                    ShpWriter.Dispose();
+                    ShxWriter.Dispose();
+
+                    ShpStream.Dispose();
+                    ShxStream.Dispose();
+                }
+
+                disposedValue = true;
+            }
+        }
+
+        public void Dispose()
+        {
+            Dispose(true);
+        }
+        #endregion
+
         private readonly FileStream ShpStream;
         private readonly FileStream ShxStream;

@@ -39,30 +67,27 @@
             Dispose();
         }

-        #region IDisposable Support
-        private bool disposedValue = false; // To detect redundant calls
-
-        void Dispose(bool disposing)
+        /// <summary>
+        /// The path the the .shp file that is being written.
+        /// </summary>
+        public string ShpFilePath
         {
-            if (!disposedValue)
+            get
             {
-                if (disposing)
-                {
-                    //TODO: Write headers to files...
-
-                    ShpStream.Dispose();
-                    ShxStream.Dispose();
-                }
-
-                disposedValue = true;
+                return ShpStream.Name;
             }
         }

-        public void Dispose()
+        /// <summary>
+        /// The path the the .shx file that is being written.
+        /// </summary>
+        public string ShxFilePath
         {
-            Dispose(true);
+            get
+            {
+                return ShxStream.Name;
+            }
         }
-        #endregion

         /// <summary>
         /// The RecordNumber for the next shape.


Add test trying to recreate the issue

Add test trying to recreate the issue

--- SolrNet.Cloud.Tests/UnityTests.cs
+++ SolrNet.Cloud.Tests/UnityTests.cs
@@ -38,5 +38,28 @@
             Assert.NotNull(
                 Setup().Resolve<ISolrReadOnlyOperations<FakeEntity>>());
         }
+
+        [Fact]
+        public void ShouldResolveIOperations ()
+        {
+            using (var container = new UnityContainer())
+            {
+                var cont = new Unity.SolrNetCloudIntegration.SolrNetContainerConfiguration().ConfigureContainer(new FakeProvider(), container);
+                var obj = cont.Resolve<ISolrOperations<Camera>>();
+
+            }
+        }
+
+        public class Camera
+        {
+            [Attributes.SolrField("Name")]
+            public string Name { get; set; }
+
+            [Attributes.SolrField("UID")]
+            public int UID { get; set; }
+
+            [Attributes.SolrField("id")]
+            public string Id { get; set; }
+        }
     }
-}+}


added some clarifying (hopefully) comments

--- HardwhereApi/Controllers/AssetController.cs
+++ HardwhereApi/Controllers/AssetController.cs
@@ -26,11 +26,13 @@
         // GET api/Asset
         public IEnumerable<DynamicAssetDto> GetAssets()
         {
-            //return "values";
-            // var result = db.Assets.ToList().Select(Mapper.Map<AssetDto>);
+            //get assets with their types and properties, and map to the asset dto
             var result = db.Assets.Include(i => i.AssetType).Include(f => f.AssetProperties).ToList().Select(Mapper.Map<AssetDto>);
+
+            //get the type properties and map to their dto
             var types = db.TypeProperties.Select(Mapper.Map<TypePropertyDto>).ToList();

+            //map the type property to the asset property for each asset
             foreach (var asset in result)
             {
                 foreach (var assetProp in asset.AssetProperties)
@@ -39,9 +41,9 @@
                 }
             }

+            //create a super-duper dynamic object, so the json/xml/etc. returned is more like {id: 1, name:'hello'}
+            //instead of something like {id:1, properties:[{propertyname='name', value: 'hello'}
             var moreAwesomeness = new List<DynamicAssetDto>();
-
-
             foreach (var asset in result)
             {
                 var dictionary = new Dictionary<string, object>();


CodeSourceUnit helper class

CodeSourceUnit helper class

Originally checked in by DEVSENSE\Jakub on 2013-10-16 20:01:57.047 as Changeset 4692

git-tfs-id: [https://devsense.visualstudio.com/DefaultCollection]$/Phalanger/Main;C7101

--- Source/Core.Parsers/SourceUnit.cs
+++ Source/Core.Parsers/SourceUnit.cs
@@ -6,9 +6,15 @@

 using PHP.Core.Parsers;
 using PHP.Core.Text;
+using System.IO;

 namespace PHP.Core
 {
+    #region SourceUnit
+
+    /// <summary>
+    /// Represents single source document.
+    /// </summary>
     public abstract class SourceUnit : ILineBreaks
     {
         #region Fields & Properties
@@ -216,4 +222,109 @@

         #endregion
     }
+
+    #endregion
+
+    #region CodeSourceUnit
+
+    /// <summary>
+    /// Source unit from string representation of code.
+    /// </summary>
+    public class CodeSourceUnit : SourceUnit
+    {
+        #region Fields & Properties
+
+        public string/*!*/ Code { get { return code; } }
+        private readonly string/*!*/ code;
+
+        /// <summary>
+        /// Initial state of source code parser. Used by <see cref="Parse"/>.
+        /// </summary>
+        private readonly Lexer.LexicalStates initialState;
+
+        #endregion
+
+        #region SourceUnit
+
+        public CodeSourceUnit(string/*!*/ code, PhpSourceFile/*!*/ sourceFile,
+            Encoding/*!*/ encoding, Lexer.LexicalStates initialState)
+            : base(sourceFile, encoding, Text.LineBreaks.Create(code))
+        {
+            this.code = code;
+            this.initialState = initialState;
+        }
+
+        public override void Parse(ErrorSink/*!*/ errors, IReductionsSink/*!*/ reductionsSink, LanguageFeatures features)
+        {
+            Parser parser = new Parser();
+
+            using (StringReader source_reader = new StringReader(code))
+            {
+                ast = parser.Parse(this, source_reader, errors, reductionsSink, initialState, features);
+            }
+        }
+
+        public override string GetSourceCode(Text.Span span)
+        {
+            return span.GetText(code);
+        }
+
+        public override void Close()
+        {
+
+        }
+
+        #endregion
+
+        #region Helpers
+
+        /// <summary>
+        /// Creates source unit and parses given <paramref name="code"/>.
+        /// </summary>
+        /// <param name="code">Source code to be parsed.</param>
+        /// <param name="sourceFile">Source file used for error reporting.</param>
+        /// <param name="errors">Errors sink. Can be <c>null</c>.</param>
+        /// <param name="reductionsSink">Reduction sink. Can be <c>null</c>.</param>
+        /// <param name="features">Optional. Language features.</param>
+        /// <param name="initialState">
+        /// Optional. Initial parser state.
+        /// This allows e.g. to parse PHP code without encapsulating the code into opening and closing tags.</param>
+        /// <returns></returns>
+        public static SourceUnit/*!*/ParseCode(string code, PhpSourceFile sourceFile,
+            ErrorSink/*!*/ errors,
+            IReductionsSink/*!*/ reductionsSink = null,
+            LanguageFeatures features = LanguageFeatures.Php5,
+            Lexer.LexicalStates initialState = Lexer.LexicalStates.INITIAL)
+        {
+            var/*!*/unit = new CodeSourceUnit(code, sourceFile, Encoding.UTF8, initialState);
+            unit.Parse(errors, reductionsSink, features);
+            unit.Close();
+
+            //
+            return unit;
+        }
+
+        #endregion
+
+        //#region ILineBreaks Members
+
+        //public override int GetLineFromPosition(int position)
+        //{
+        //    // shift the position
+        //    return base.GetLineFromPosition(position) + this.Line;
+        //}
+
+        //public override void GetLineColumnFromPosition(int position, out int line, out int column)
+        //{
+        //    // shift the position
+        //    base.GetLineColumnFromPosition(position, out line, out column);
+        //    if (line == 0)
+        //        column += this.Column;
+        //    line += this.Line;
+        //}
+
+        //#endregion
+    }
+
+    #endregion
 }


bind MainWindowViewModel as datacontext to main view

--- Hospital/DesktopApp/View/MainWindow.xaml.cs
+++ Hospital/DesktopApp/View/MainWindow.xaml.cs
@@ -13,6 +13,7 @@
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 using DesktopApp.Model;
+using DesktopApp.ViewModel;

 namespace DesktopApp
 {
@@ -23,6 +24,7 @@
 	{
 		public MainWindow()
 		{
+			this.DataContext = new MainWindowViewModel();
 			InitializeComponent();
 		}
 	}


CI: updated AssemblyInfo version to 2.6.1013.3


CI Build Number Updated

CI Build Number Updated

git-svn-id: 7f05ad86c4f4f5ca50611136d23b835364929451@257 b33fba48-7441-0410-8d5c-f397f7ceaa6c

--- Source/Properties/AssemblyInfo.cs
+++ Source/Properties/AssemblyInfo.cs
@@ -7,7 +7,7 @@
 [assembly: AssemblyProduct("Moq")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("3.0.925.8")]
+[assembly: AssemblyVersion("3.0.925.9")]
 [assembly: AssemblyFileVersion("3.0.0.0")]

 [assembly: InternalsVisibleTo("Moq.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001009f7a95086500f8f66d892174803850fed9c22225c2ccfff21f39c8af8abfa5415b1664efd0d8e0a6f7f2513b1c11659bd84723dc7900c3d481b833a73a2bcf1ed94c16c4be64d54352c86956c89930444e9ac15124d3693e3f029818e8410f167399d6b995324b635e95353ba97bfab856abbaeb9b40c9b160070c6325e22ddc")]


process_cpu_seconds_total needs to be a counter because it gets merged with other process_cpu_seconds_total metrics in Pushgateway

Ref #31

--- Prometheus.NetStandard/Advanced/DotNetStatsCollector.cs
+++ Prometheus.NetStandard/Advanced/DotNetStatsCollector.cs
@@ -16,7 +16,7 @@
         private Gauge _virtualMemorySize;
         private Gauge _workingSet;
         private Gauge _privateMemorySize;
-        private Gauge _cpuTotal;
+        private Counter _cpuTotal;
         private Gauge _openHandles;
         private Gauge _startTime;
         private Gauge _numThreads;
@@ -40,7 +40,7 @@

             // Metrics that make sense to compare between all operating systems
             _startTime = metrics.CreateGauge("process_start_time_seconds", "Start time of the process since unix epoch in seconds");
-            _cpuTotal = metrics.CreateGauge("process_cpu_seconds_total", "Total user and system CPU time spent in seconds");
+            _cpuTotal = metrics.CreateCounter("process_cpu_seconds_total", "Total user and system CPU time spent in seconds");

             _virtualMemorySize = metrics.CreateGauge("process_windows_virtual_bytes", "Process virtual memory size");
             _workingSet = metrics.CreateGauge("process_windows_working_set", "Process working set");
@@ -74,7 +74,7 @@
                 _virtualMemorySize.Set(_process.VirtualMemorySize64);
                 _workingSet.Set(_process.WorkingSet64);
                 _privateMemorySize.Set(_process.PrivateMemorySize64);
-                _cpuTotal.Set(_process.TotalProcessorTime.TotalSeconds);
+                _cpuTotal.Inc(Math.Max(0, _process.TotalProcessorTime.TotalSeconds - _cpuTotal.Value));
                 _openHandles.Set(_process.HandleCount);
                 _numThreads.Set(_process.Threads.Count);
             }


Code cleanups

Code cleanups

--- RDFSharp/Semantics/OWL/Ontology/Data/RDFOntologyData.cs
+++ RDFSharp/Semantics/OWL/Ontology/Data/RDFOntologyData.cs
@@ -186,6 +186,7 @@
                         this.Annotations.IsDefinedBy.AddEntry(new RDFOntologyTaxonomyEntry(ontologyFact, RDFVocabulary.RDFS.IS_DEFINED_BY.ToRDFOntologyAnnotationProperty(), annotationValue));
                         break;

+                    #region Unsupported
                     //owl:versionIRI
                     case RDFSemanticsEnums.RDFOntologyStandardAnnotation.VersionIRI:
                         RDFSemanticsEvents.RaiseSemanticsInfo("Cannot annotate ontology fact with owl:versionIRI because it is reserved for ontologies");
@@ -210,6 +211,7 @@
                     case RDFSemanticsEnums.RDFOntologyStandardAnnotation.IncompatibleWith:
                         RDFSemanticsEvents.RaiseSemanticsInfo("Cannot annotate ontology fact with owl:incompatibleWith because it is reserved for ontologies");
                         break;
+                    #endregion
                 }
             }
             return this;
@@ -247,6 +249,7 @@
                     else if (ontologyAnnotationProperty.Equals(RDFVocabulary.RDFS.IS_DEFINED_BY))
                         this.AddStandardAnnotation(RDFSemanticsEnums.RDFOntologyStandardAnnotation.IsDefinedBy, ontologyFact, annotationValue);

+                    #region Unsupported
                     //owl:versionIRI
                     else if (ontologyAnnotationProperty.Equals(RDFVocabulary.OWL.VERSION_IRI))
                         this.AddStandardAnnotation(RDFSemanticsEnums.RDFOntologyStandardAnnotation.VersionIRI, ontologyFact, annotationValue);
@@ -266,6 +269,7 @@
                     //owl:priorVersion
                     else if (ontologyAnnotationProperty.Equals(RDFVocabulary.OWL.PRIOR_VERSION))
                         this.AddStandardAnnotation(RDFSemanticsEnums.RDFOntologyStandardAnnotation.PriorVersion, ontologyFact, annotationValue);
+                    #endregion
                 }

                 //custom annotation
@@ -778,11 +782,6 @@
                         this.Annotations.VersionInfo.RemoveEntry(new RDFOntologyTaxonomyEntry(ontologyFact, RDFVocabulary.OWL.VERSION_INFO.ToRDFOntologyAnnotationProperty(), annotationValue));
                         break;

-                    //owl:versionIRI
-                    case RDFSemanticsEnums.RDFOntologyStandardAnnotation.VersionIRI:
-                        this.Annotations.VersionIRI.RemoveEntry(new RDFOntologyTaxonomyEntry(ontologyFact, RDFVocabulary.OWL.VERSION_IRI.ToRDFOntologyAnnotationProperty(), annotationValue));
-                        break;
-
                     //rdfs:comment
                     case RDFSemanticsEnums.RDFOntologyStandardAnnotation.Comment:
                         this.Annotations.Comment.RemoveEntry(new RDFOntologyTaxonomyEntry(ontologyFact, RDFVocabulary.RDFS.COMMENT.ToRDFOntologyAnnotationProperty(), annotationValue));
@@ -819,10 +818,6 @@
                 //owl:versionInfo
                 if (ontologyAnnotationProperty.Equals(RDFVocabulary.OWL.VERSION_INFO.ToRDFOntologyAnnotationProperty()))
                     this.RemoveStandardAnnotation(RDFSemanticsEnums.RDFOntologyStandardAnnotation.VersionInfo, ontologyFact, annotationValue);
-
-                //owl:versionIRI
-                else if (ontologyAnnotationProperty.Equals(RDFVocabulary.OWL.VERSION_IRI.ToRDFOntologyAnnotationProperty()))
-                    this.RemoveStandardAnnotation(RDFSemanticsEnums.RDFOntologyStandardAnnotation.VersionIRI, ontologyFact, annotationValue);

                 //rdfs:comment
                 else if (ontologyAnnotationProperty.Equals(RDFVocabulary.RDFS.COMMENT.ToRDFOntologyAnnotationProperty()))
@@ -839,7 +834,12 @@
                 //rdfs:isDefinedBy
                 else if (ontologyAnnotationProperty.Equals(RDFVocabulary.RDFS.IS_DEFINED_BY.ToRDFOntologyAnnotationProperty()))
                     this.RemoveStandardAnnotation(RDFSemanticsEnums.RDFOntologyStandardAnnotation.IsDefinedBy, ontologyFact, annotationValue);
-
+
+                #region Unsupported
+                //owl:versionIRI
+                else if (ontologyAnnotationProperty.Equals(RDFVocabulary.OWL.VERSION_IRI.ToRDFOntologyAnnotationProperty()))
+                    this.RemoveStandardAnnotation(RDFSemanticsEnums.RDFOntologyStandardAnnotation.VersionIRI, ontologyFact, annotationValue);
+
                 //owl:imports
                 else if (ontologyAnnotationProperty.Equals(RDFVocabulary.OWL.IMPORTS.ToRDFOntologyAnnotationProperty()))
                     this.RemoveStandardAnnotation(RDFSemanticsEnums.RDFOntologyStandardAnnotation.Imports, ontologyFact, annotationValue);
@@ -855,7 +855,8 @@
                 //owl:priorVersion
                 else if (ontologyAnnotationProperty.Equals(RDFVocabulary.OWL.PRIOR_VERSION.ToRDFOntologyAnnotationProperty()))
                     this.RemoveStandardAnnotation(RDFSemanticsEnums.RDFOntologyStandardAnnotation.PriorVersion, ontologyFact, annotationValue);
-
+                #endregion
+
                 //custom annotation
                 else
                     this.Annotations.CustomAnnotations.RemoveEntry(new RDFOntologyTaxonomyEntry(ontologyFact, ontologyAnnotationProperty, annotationValue));


Generator now reads docs in memory.

Generator now reads docs in memory.

--- Source/Tools/Generator/Program.cs
+++ Source/Tools/Generator/Program.cs
@@ -18,6 +18,8 @@

         class FunctionData
         {
+            public string Docs { get; set; }
+
             public bool IsCallback { get; set; }

             public string ReturnType { get; set; }
@@ -66,6 +68,32 @@
             return result;
         }

+        private static string ParseDocs(string[] lines, int i)
+        {
+            while (!lines[i].StartsWith("/*!"))
+            {
+                i--;
+            }
+
+            StringBuilder sb = new StringBuilder(512);
+
+            while (!lines[i].StartsWith(" */"))
+            {
+                if (lines[i].Length >= 4)
+                {
+                    sb.AppendLine(lines[i].Substring(4));
+                }
+                else
+                {
+                    sb.AppendLine();
+                }
+
+                i++;
+            }
+
+            return sb.ToString();
+        }
+
         private static void Parse(string[] lines, List<EnumData> enums, List<FunctionData> functions)
         {
             for (int i = 0; i < lines.Length; i++)
@@ -90,6 +118,8 @@
                     int j = 1;

                     FunctionData functionData = new FunctionData();
+
+                    functionData.Docs = ParseDocs(lines, i);

                     functionData.ReturnType = ParseType(parts, ref j);
                     j++;


check if candles are available

check if candles are available

--- Indicator/FindHighLowTimeFrame_Indicator.cs
+++ Indicator/FindHighLowTimeFrame_Indicator.cs
@@ -147,11 +147,14 @@
                     break;
                 case FindHighLowTimeFrame_Type.Candle:
                     //Draw it for the candles
-                    DateTime startcandle = Bars[this._CandlesAgo].Time.Date;
-                    double lastmiddle = Bars[this._CandlesAgo].Low + (Bars[this._CandlesAgo].Range / 2);
-                    if (this.IsDrawMiddleLineEnabled)
+                    if (Bars.Count() - 1 >= this.CandlesAgo)
                     {
-                        DrawHorizontalLine("MiddleLineOnCandle" + startcandle.Ticks, true, lastmiddle, this.CurrentSessionLineColor, this.CurrentSessionLineStyle, this.CurrentSessionLineWidth);
+                        DateTime startcandle = Bars[this.CandlesAgo].Time.Date;
+                        double lastmiddle = Bars[this.CandlesAgo].Low + (Bars[this.CandlesAgo].Range / 2);
+                        if (this.IsDrawMiddleLineEnabled)
+                        {
+                            DrawHorizontalLine("MiddleLineOnCandle" + startcandle.Ticks, true, lastmiddle, this.CurrentSessionLineColor, this.CurrentSessionLineStyle, this.CurrentSessionLineWidth);
+                        }
                     }
                     break;
                 default:


Handling of composite document ids

Handling of composite document ids

--- Raven.Client.Contrib/Extensions/DocumentIdExtensions.cs
+++ Raven.Client.Contrib/Extensions/DocumentIdExtensions.cs
@@ -65,12 +65,11 @@
         /// <exception cref="ArgumentException">Thrown if the inputs are not valid.</exception>
         public static int GetIntegerIdFor<T>(this IDocumentStore documentStore, string id)
         {
-            var separator = documentStore.Conventions.IdentityPartsSeparator;
-
-            var parts = id.Split(new[] { separator }, StringSplitOptions.None);
-            if (parts.Length != 2)
+            var parts = documentStore.GetDocumentIdParts(id);
+            if (parts.Length < 2)
                 throw new ArgumentException(
-                    String.Format(@"The string id is not of the correct form: entity{0}integer.", separator),
+                    String.Format(@"The string id is not of the correct form: entity{0}integer.",
+                                  documentStore.Conventions.IdentityPartsSeparator),
                     "id");

             var prefix = documentStore.GetDocumentKeyPrefix<T>();
@@ -96,12 +95,11 @@
         /// <exception cref="ArgumentException">Thrown if the inputs are not valid.</exception>
         public static Guid GetGuidIdFor<T>(this IDocumentStore documentStore, string id)
         {
-            var separator = documentStore.Conventions.IdentityPartsSeparator;
-
-            var parts = id.Split(new[] { separator }, StringSplitOptions.None);
-            if (parts.Length != 2)
+            var parts = documentStore.GetDocumentIdParts(id);
+            if (parts.Length < 2)
                 throw new ArgumentException(
-                    String.Format(@"The string id is not of the correct form: entity{0}guid.", separator),
+                    String.Format(@"The string id is not of the correct form: entity{0}guid.",
+                                  documentStore.Conventions.IdentityPartsSeparator),
                     "id");

             var prefix = documentStore.GetDocumentKeyPrefix<T>();
@@ -116,5 +114,17 @@

             return guidId;
         }
+
+        /// <summary>
+        /// Splits a composite document id into its parts for easy consumption.
+        /// </summary>
+        /// <param name="documentStore">The Raven document store.</param>
+        /// <param name="id">The string id, such as foos/1/bar/2/whatever.</param>
+        /// <returns>An array of strings with each part as a separate element.</returns>
+        public static string[] GetDocumentIdParts(this IDocumentStore documentStore, string id)
+        {
+            var separator = documentStore.Conventions.IdentityPartsSeparator;
+            return id.Split(new[] { separator }, StringSplitOptions.None);
+        }
     }
 }


Revert "introduce StateMachine class"

Revert "introduce StateMachine class"

This reverts commit 87e72b081d9e86ebf465ef35b88c0714dc03ea57.

--- KnuthMorrisPratt/KnuthMorrisPratt/Finder.cs
+++ KnuthMorrisPratt/KnuthMorrisPratt/Finder.cs
@@ -103,36 +103,5 @@
         {
             return sequence.Select(c => _abc[c]);
         }
-
-        [System.Diagnostics.DebuggerDisplay("{DebugView}")]
-        private class StateMachine
-        {
-            private readonly int[][] _storage;
-
-            public StateMachine(int abcLenth, int statesCount)
-            {
-                _storage = new int[abcLenth][];
-                for (int i = 0; i < abcLenth; i++)
-                    _storage[i] = new int[statesCount];
-            }
-
-            public int this[int c, int state]
-            {
-                get { return _storage[c][state]; }
-                set { _storage[c][state] = value; }
-            }
-
-            public string DebugView
-            {
-                get
-                {
-                    return string.Join(
-                        Environment.NewLine,
-                        _storage.Select(row => string.Join(
-                                                    "|",
-                                                    row.Select(o => o.ToString("000")))));
-                }
-            }
-        }
     }
 }


air release work again

air release work again

--- LegendaryClient/Windows/PatcherPage.xaml.cs
+++ LegendaryClient/Windows/PatcherPage.xaml.cs
@@ -524,10 +524,10 @@
                 WebClient UpdateClient = new WebClient();
                 string Release = UpdateClient.DownloadString("http://l3cdn.riotgames.com/releases/live/projects/lol_air_client/releases/releaselisting");
                 string LatestVersion = Release.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0];
-                if (LatestVersion == "0.0.1.110") //temporary workaround
+                /*if (LatestVersion == "0.0.1.110") //temporary workaround
                 {
                      LatestVersion = "0.0.1.109";
-                }
+                }*/
                 if (AirVersion != LatestVersion)
                 {
                     //Download Air Assists from riot


Minor code cleanup

Minor code cleanup

--- Spark/ViewModels/MainViewModel.cs
+++ Spark/ViewModels/MainViewModel.cs
@@ -174,7 +174,7 @@
             int serverPort = settings.ServerPort;
             ClientVersion clientVersion = null;

-            #region Verify Client Executable
+            #region Validate Client Executable Path
             if (!File.Exists(settings.ClientExecutablePath))
             {
                 Debug.WriteLine("ClientExecutableNotFound: {0}", settings.ClientExecutablePath);
@@ -192,15 +192,8 @@
             {
                 try
                 {
-                    // Auto-detect using the computed MD5 hash
-                    using (var md5 = MD5.Create())
-                    {
-                        var hashString = md5.ComputeHashString(settings.ClientExecutablePath);
-
-                        // Find the client version by hash
-                        Debug.WriteLine(string.Format("ClientHash = {0}", hashString));
-                        clientVersion = clientVersions.FirstOrDefault(x => x.Hash.Equals(hashString, StringComparison.OrdinalIgnoreCase));
-                    }
+                    // Detect client version via MD5 hash
+                    clientVersion = DetectClientVersion(settings.ClientExecutablePath, clientVersions);
                 }
                 catch (Exception ex)
                 {
@@ -235,18 +228,8 @@
             {
                 try
                 {
-                    // Lookup the server hostname (via DNS)
-                    var hostEntry = Dns.GetHostEntry(settings.ServerHostname);
-
-                    // Find the IPv4 address
-                    foreach (var ipAddress in hostEntry.AddressList)
-                    {
-                        if (ipAddress.AddressFamily == AddressFamily.InterNetwork)
-                        {
-                            serverIPAddress = ipAddress;
-                            break;
-                        }
-                    }
+                    // Resolve the hostname via DNS
+                    serverIPAddress = ResolveHostname(settings.ServerHostname);

                     // An error occured when trying to resolve the hostname to an IPv4 address
                     if (serverIPAddress == null)
@@ -263,7 +246,6 @@
                 catch (Exception ex)
                 {
                     // An error occured when trying to resolve the hostname
-
                     Debug.WriteLine(string.Format("UnableToResolveHostname: {0}", ex.Message));

                     this.DialogService.ShowOKDialog("Unable to Resolve Hostname",
@@ -309,18 +291,37 @@
             }
             #endregion
         }
-
-        void PatchClient(UserSettings settings, SuspendedProcess process, ClientVersion clientVersion, IPAddress serverIPAddress, int serverPort)
-        {
-            if (settings == null)
-                throw new ArgumentNullException("settings");
-
-            if (process == null)
-                throw new ArgumentNullException("process");
-
-            if (clientVersion == null)
-                throw new ArgumentNullException("clientVersion");
-
+        #endregion
+
+        #region Helper Methods
+        static ClientVersion DetectClientVersion(string fileName, IEnumerable<ClientVersion> availableVersions)
+        {
+            // Auto-detect using the computed MD5 hash
+            using (var md5 = MD5.Create())
+            {
+                var hashString = md5.ComputeHashString(fileName);
+
+                // Find the client version by hash
+                Debug.WriteLine(string.Format("ClientHash = {0}", hashString));
+                return availableVersions.FirstOrDefault(x => x.Hash.Equals(hashString, StringComparison.OrdinalIgnoreCase));
+            }
+        }
+
+        static IPAddress ResolveHostname(string hostname)
+        {
+            // Lookup the server hostname (via DNS)
+            var hostEntry = Dns.GetHostEntry(hostname);
+
+            // Find the IPv4 addresses
+            var ipAddresses = from ip in hostEntry.AddressList
+                              where ip.AddressFamily == AddressFamily.InterNetwork
+                              select ip;
+
+            return ipAddresses.FirstOrDefault();
+        }
+
+        static void PatchClient(UserSettings settings, SuspendedProcess process, ClientVersion clientVersion, IPAddress serverIPAddress, int serverPort)
+        {
             if (settings.ShouldRedirectClient && serverIPAddress == null)
                 throw new ArgumentNullException("serverIPAddress", "Server IP address must be specified when redirecting the client");


[+] Adicionado código da versão da tabela

--- SpedBr/SpedBr.Common/Constants.cs
+++ SpedBr/SpedBr.Common/Constants.cs
@@ -1,13 +1,9 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace SpedBr.Common
+namespace SpedBr.Common
 {
     public class Constants
     {
         public const decimal VZero = 0.00M;
         public const string StructuralError = "|ERRO_NA_ESTRUTURA|";
+        public const int COD_VER = 012;
     }
 }


map object bug fix. Make object null if column is default, null ---> or not selected <---.

--- SprocMapperLibrary/SprocMapper.cs
+++ SprocMapperLibrary/SprocMapper.cs
@@ -331,7 +331,11 @@

                 int ordinal;
                 if (!sprocObjectMap.ColumnOrdinalDic.TryGetValue(actualColumn, out ordinal))
+                {
+                    defaultOrNullCounter++;
                     continue;
+                }
+

                 Member member;
                 if (!sprocObjectMap.MemberInfoCache.TryGetValue(column, out member))


fix GetDictionaryAsync returns null https://github.com/sqlkata/querybuilder/issues/418

--- SqlKata.Execution/QueryFactory.cs
+++ SqlKata.Execution/QueryFactory.cs
@@ -107,12 +107,14 @@
         {
             var compiled = CompileAndLog(query);

-            return this.Connection.Query(
+            var result = this.Connection.Query(
                 compiled.Sql,
                 compiled.NamedBindings,
                 transaction: transaction,
                 commandTimeout: timeout ?? this.QueryTimeout
-            ) as IEnumerable<IDictionary<string, object>>;
+            );
+
+            return result.Cast<IDictionary<string, object>>();
         }

         public async Task<IEnumerable<IDictionary<string, object>>> GetDictionaryAsync(Query query, IDbTransaction transaction = null, int? timeout = null)
@@ -126,7 +128,7 @@
                 commandTimeout: timeout ?? this.QueryTimeout
             );

-            return result as IEnumerable<IDictionary<string, object>>;
+            return result.Cast<IDictionary<string, object>>();
         }

         public IEnumerable<dynamic> Get(Query query, IDbTransaction transaction = null, int? timeout = null)


Reduce nesting

Reduce nesting

--- MediaFileParser/MediaTypes/TvFile/TvFile.cs
+++ MediaFileParser/MediaTypes/TvFile/TvFile.cs
@@ -41,13 +41,10 @@
         private uint GetSeasonFromDir()
         {
             var match = Regex.Match(Folder, "((?<=((Season|Series).))[1-9][0-9]*|Specials?)", RegexOptions.IgnoreCase);
-            if (match.Success && !Regex.IsMatch(Folder, "Specials", RegexOptions.IgnoreCase))
-            {
-                uint season;
-                uint.TryParse(match.Value, out season);
-                return season;
-            }
-            return 0;
+            if (!match.Success || Regex.IsMatch(Folder, "Specials", RegexOptions.IgnoreCase)) return 0;
+            uint season;
+            uint.TryParse(match.Value, out season);
+            return season;
         }

         /// <summary>


Added EditorBrowsableState.Never to Freeze,

because people always think it does what the Inject method does. Although
I've never myself used this Freeze method as intended, theoretically, it's
a feature, so shouldn't be removed.
However, I don't think anyone actually uses this method correctly, so
hiding it with EditorBrowsableState.Never seems like the best option. If
you really need it, it's still there, but in normal cases you shouldn't
see it in IntelliSense.

--- Src/AutoFixture/FixtureFreezer.cs
+++ Src/AutoFixture/FixtureFreezer.cs
@@ -1,4 +1,5 @@
 using System;
+using System.ComponentModel;
 using Ploeh.AutoFixture.Dsl;
 using Ploeh.AutoFixture.Kernel;

@@ -69,6 +70,7 @@
         /// <seealso cref="Freeze{T}(IFixture)"/>
         /// <seealso cref="Freeze{T}(IFixture, Func{ICustomizationComposer{T}, ISpecimenBuilderComposer})"/>
         /// <seealso cref="FixtureRegistrar.Inject" />
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public static T Freeze<T>(this IFixture fixture, T seed)
         {
             if (fixture == null)


external links refactoring

external links refactoring

--- Srclib.Nuget/Graph/GraphRunner.cs
+++ Srclib.Nuget/Graph/GraphRunner.cs
@@ -33,7 +33,7 @@
         SemanticModel _sm;
         string _path;

-        private GraphRunner() : base(SyntaxWalkerDepth.Token)
+        static GraphRunner()
         {
             projectUrlToRepo["http://www.newtonsoft.com/json"] = "github.com/JamesNK/Newtonsoft.Json";
             projectUrlToRepo["http://autofac.org/"] = "github.com/autofac/Autofac";
@@ -44,6 +44,72 @@
             // so we probably need a multimap here
             // TODO($ildarisaev): implement a correct mapping for all dlls
             projectUrlToRepo["http://www.asp.net/"] = "github.com/aspnet/dnx";
+
+            dllToProjectUrl["mscorlib.dll"] = "github.com/dotnet/coreclr";
+            dllToProjectUrl["System.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Activities.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Activities.Core.Presentation.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Activities.DurableInstancing.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.Activities.Presentation.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.ComponentModel.DataAnnotations.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Configuration.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Core.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.Data.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Data.DataSetExtensions.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Data.Entity.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Data.Entity.Design.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.Data.Linq.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Data.SqlXml.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.IdentityModel.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.IdentityModel.Selectors.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.Net.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Numerics.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Runtime.Caching.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Runtime.DurableInstancing.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.Runtime.Serialization.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.ServiceModel.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.ServiceModel.Activation.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.ServiceModel.Activities.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.ServiceModel.Channels.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.ServiceModel.Discovery.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.ServiceModel.Internals.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.ServiceModel.Routing.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.ServiceModel.WasHosting.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.ServiceModel.Web.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Web.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Web.ApplicationServices.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.Web.DynamicData.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Web.Entity.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Web.Entity.Design.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Web.Extensions.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.Web.Mobile.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Web.Routing.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Web.Services.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Workflow.Activities.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.Workflow.ComponentModel.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Workflow.Runtime.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.WorkflowServices.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Xaml.Hosting.dll"] = "github.com/Microsoft/referencesource";
+
+            dllToProjectUrl["System.Xml.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["System.Xml.Linq.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["XamlBuildTask.dll"] = "github.com/Microsoft/referencesource";
+            dllToProjectUrl["SMDiagnostics.dll"] = "github.com/Microsoft/referencesource";
+        }
+
+        private GraphRunner() : base(SyntaxWalkerDepth.Token)
+        {
+
         }

         /// <summary>
@@ -96,9 +162,10 @@
                         var reference = Ref.To(definition).At(file, token.Span);
                         if ((definition.ContainingAssembly != null) && (definition.ContainingAssembly.Identity != null) && (definition.ContainingAssembly.Identity.Name != null))
                         {
-                            if (dllToProjectUrl.ContainsKey(definition.ContainingAssembly.Identity.Name + ".dll"))
+                            string dll = definition.ContainingAssembly.Identity.Name + ".dll";
+                            if (dllToProjectUrl.ContainsKey(dll))
                             {
-                                string url = dllToProjectUrl[definition.ContainingAssembly.Identity.Name + ".dll"];
+                                string url = dllToProjectUrl[dll];
                                 if (projectUrlToRepo.ContainsKey(url))
                                 {
                                     url = projectUrlToRepo[url];
@@ -113,300 +180,6 @@
                                     reference.DefUnitType = "NugetPackage";
                                 }
                             }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("mscorlib"))
-                            {
-                                reference.DefRepo = "github.com/dotnet/coreclr";
-                                reference.DefUnit = "mscorlib";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Activities"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Activities";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Activities.Core.Presentation"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Activities.Core.Presentation";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Activities.DurableInstancing"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Activities.DurableInstancing";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Activities.Presentation"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Activities.Presentation";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.ComponentModel.DataAnnotations"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.ComponentModel.DataAnnotations";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Configuration"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Configuration";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Core"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Core";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Data"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Data";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Data.DataSetExtensions"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Data.DataSetExtensions";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Data.Entity"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Data.Entity";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Data.Entity.Design"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Data.Entity.Design";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("SSystem.Data.Linq"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Data.Linq";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Data.SqlXml"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Data.SqlXml";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.IdentityModel"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.IdentityModel";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.IdentityModel.Selectors"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.IdentityModel.Selectors";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Net"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Net";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Numerics"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Numerics";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Runtime.Caching"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Runtime.Caching";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Runtime.DurableInstancing"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Runtime.DurableInstancing";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Runtime.Serialization"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Runtime.Serialization";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.ServiceModel"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.ServiceModel";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.ServiceModel.Activation"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.ServiceModel.Activation";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.ServiceModel.Activities"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.ServiceModel.Activities";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.ServiceModel.Channels"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.ServiceModel.Channels";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.ServiceModel.Discovery"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.ServiceModel.Discovery";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.ServiceModel.Internals"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.ServiceModel.Internals";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.ServiceModel.Routing"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.ServiceModel.Routing";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.ServiceModel.WasHosting"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.ServiceModel.WasHosting";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.ServiceModel.Web"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.ServiceModel.Web";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Web"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Web";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Web.ApplicationServices"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Web.ApplicationServices";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Web.DynamicData"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Web.DynamicData";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Web.Entity"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Web.Entity";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Web.Entity.Design"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Web.Entity.Design";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Web.Extensions"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Web.Extensions";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Web.Mobile"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Web.Mobile";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Web.Routing"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Web.Routing";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Web.Services"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Web.Services";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Workflow.Activities"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Workflow.Activities";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Workflow.ComponentModel"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Workflow.ComponentModel";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Workflow.Runtime"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Workflow.Runtime";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.WorkflowServices"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.WorkflowServices";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Xaml.Hosting"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Xaml.Hosting";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Xml"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Xml";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("System.Xml.Linq"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "System.Xml.Linq";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("XamlBuildTask"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "XamlBuildTask";
-                                reference.DefUnitType = "NugetPackage";
-                            }
-                            else if (definition.ContainingAssembly.Identity.Name.Equals("SMDiagnostics"))
-                            {
-                                reference.DefRepo = "github.com/Microsoft/referencesource";
-                                reference.DefUnit = "SMDiagnostics";
-                                reference.DefUnitType = "NugetPackage";
-                            }
                         }
                         _output.Refs.Add(reference);
                     }
@@ -458,13 +231,15 @@
                     {
                         try
                         {
-                            sources[i] = Microsoft.CodeAnalysis.Text.SourceText.From(new FileStream(files[i], FileMode.Open));
+                            FileStream source = new FileStream(files[i], FileMode.Open);
+                            sources[i] = Microsoft.CodeAnalysis.Text.SourceText.From(source);
                             trees[i] = CSharpSyntaxTree.ParseText(sources[i]);
                             if (trees[i] != null)
                             {
                                 compilation = compilation.AddSyntaxTrees(trees[i]);
                                 dict[trees[i]] = files[i];
                             }
+                            source.Dispose();
                         }
                         catch (Exception e)
                         {