Add preliminary hit check with hit thickness for PointNode.

--- Source/HelixToolkit.SharpDX.Shared/Model/Scene/PointNode.cs
+++ Source/HelixToolkit.SharpDX.Shared/Model/Scene/PointNode.cs
@@ -133,6 +133,18 @@
                 return base.OnCheckGeometry(geometry) && geometry is PointGeometry3D;
             }

+            protected override bool PreHitTestOnBounds(HitTestContext context)
+            {
+                var center = BoundsSphereWithTransform.Center;
+                var centerSp = context.RenderMatrices.Project(center);
+                if (centerSp.X >= 0 && centerSp.Y >= 0
+                    && (centerSp - context.HitPointSP).Length() <= hitTestThickness)
+                {
+                    return true;
+                }
+                return base.PreHitTestOnBounds(context);
+            }
+
             protected override bool OnHitTest(HitTestContext context, Matrix totalModelMatrix, ref List<HitTestResult> hits)
             {
                 return (Geometry as PointGeometry3D).HitTest(context, totalModelMatrix, ref hits, this.WrapperSource, (float)HitTestThickness);


fix to path

fix to path

--- 100-basic-encoding/encode-blob-singleInput/run.csx
+++ 100-basic-encoding/encode-blob-singleInput/run.csx
@@ -75,14 +75,22 @@

         // Read in custom preset string
         log.Info("Home= " + Environment.GetEnvironmentVariable("HOME", EnvironmentVariableTarget.Process));
-        // string presetPath = Path.Combine(Environment.GetEnvironmentVariable("HOME", EnvironmentVariableTarget.Process), @"site\repository\100-basic-encoding\presets\singleMP4.json");
-        string preset = File.ReadAllText(@"../presets/singleMP4.json");
+        string homePath = Environment.GetEnvironmentVariable("HOME", EnvironmentVariableTarget.Process));
+        string presetPath;
+
+        if (homePath == String.Empty){
+            presetPath = @"../presets/singleMP4.json";
+        }else{
+            presetPath =  Path.Combine(homePath, @"site\repository\100-basic-encoding\presets\singleMP4.json");
+        }
+
+        string preset = File.ReadAllText(presetPath);

         // Create a task with the encoding details, using a custom preset
         ITask task = job.Tasks.AddNew("Encode with Custom Preset",
             processor,
             preset,
-            TaskOptions.None);
+            TaskOptions.None);

         // Specify the input asset to be encoded.
         task.InputAssets.Add(newAsset);


Test case for different dictionaries by key added.

--- Sources/Equ.Test/ElementwiseSequenceEqualityComparerTest.cs
+++ Sources/Equ.Test/ElementwiseSequenceEqualityComparerTest.cs
@@ -104,10 +104,22 @@
         }

         [Fact]
-        public void Different_dictionaries_are_reported_unequal()
+        public void Different_dictionaries_by_value_are_reported_unequal()
         {
             var dict1 = new Dictionary<int, string> { { 1, "a" }, { 2, "b" } };
             var dict2 = new Dictionary<int, string> { { 1, "a" }, { 2, "c" } };
+
+            var comparer = new ElementwiseSequenceEqualityComparer<IDictionary>();
+
+            Assert.False(comparer.Equals(dict1, dict2));
+            Assert.NotEqual(comparer.GetHashCode(dict1), comparer.GetHashCode(dict2));
+        }
+
+        [Fact]
+        public void Different_dictionaries_by_key_are_reported_unequal()
+        {
+            var dict1 = new Dictionary<int, string> { { 1, "a" }, { 2, "b" } };
+            var dict2 = new Dictionary<int, string> { { 1, "a" }, { 3, "b" } };

             var comparer = new ElementwiseSequenceEqualityComparer<IDictionary>();


Still a little more code beautifying

Still a little more code beautifying

--- StockExchangeYahooFinance/Services/ApiRequest/ApiRequest.cs
+++ StockExchangeYahooFinance/Services/ApiRequest/ApiRequest.cs
@@ -102,20 +102,20 @@
             var rows = request.Replace("\r", "").Split('\n');
             //Get data from string
             var prices = (from row in rows
-                          where !string.IsNullOrEmpty(row)
-                          select row.Split(',')
+                where !string.IsNullOrEmpty(row)
+                select row.Split(',')
                 into cols
-                          select new FinanceModel
-                          {
-                              Symbol = cols[0],
-                              Name = cols[1],
-                              Bid = (cols[2]),
-                              Ask = (cols[3]),
-                              Open = (cols[4]),
-                              PreviousClose = (cols[5]),
-                              LastTradePriceOnly = (cols[6]),
-                              Change = cols[7]
-                          }).ToList();
+                select new FinanceModel
+                {
+                    Symbol = cols[0],
+                    Name = cols[1],
+                    Bid = (cols[2]),
+                    Ask = (cols[3]),
+                    Open = (cols[4]),
+                    PreviousClose = (cols[5]),
+                    LastTradePriceOnly = (cols[6]),
+                    Change = cols[7]
+                }).ToList();
             //Write data in console
             foreach (var price in prices)
             {
@@ -136,7 +136,9 @@
         /// <returns>List of Currencies with id, bid, name, rate, date....</returns>
         public async Task XchangeTask(TimeSpan interval, CancellationToken cancellationToken)
         {
-            var url = CfgManager.YahooBaseUrl + YqlQuery.SelectAll + CfgManager.YahooXchange + YqlQuery.WherePair + YqlQuery.In + "(%22" + CfgManager.Curencies + "%22)" + CfgManager.Format + CfgManager.Enviroment + CfgManager.CallBack;
+            var url = CfgManager.YahooBaseUrl + YqlQuery.SelectAll + CfgManager.YahooXchange + YqlQuery.WherePair +
+                      YqlQuery.In + "(%22" + CfgManager.Curencies + "%22)" + CfgManager.Format + CfgManager.Enviroment +
+                      CfgManager.CallBack;
             while (true)
             {
                 var task = Task.Delay(interval, cancellationToken);
@@ -234,7 +236,8 @@
                         };
                         await _repository.AddCompany(companies);
                         //results.Add(com + "\t" + tickerName + "\t" + lastTrade + "\t" + type + "\t" + industry + "\t" + exchange);
-                        Console.WriteLine(com + "\t" + tickerName + "\t" + lastTrade + "\t" + type + "\t" + industryN + "\t" + exchangeId);
+                        Console.WriteLine(com + "\t" + tickerName + "\t" + lastTrade + "\t" + type + "\t" + industryN +
+                                          "\t" + exchangeId);
                     }
                 }
             }
@@ -318,20 +321,20 @@
                 var rows = csvData.Replace("\r", "").Split('\n');
                 //Get data from string
                 var companies = (from row in rows
-                                 where !string.IsNullOrEmpty(row)
-                                 let csvSplit = new Regex("((?<=\")[^\"]*(?=\"(,|$)+)|(?<=,|^)[^,\"]*(?=,|$))").Matches(row)
-                                 let cols = row.Split(',')
-                                 select new CompaniesViewModel()
-                                 {
-                                     Symbol = csvSplit[0].ToString(),
-                                     Name = csvSplit[1].ToString(),
-                                     LastSale = csvSplit[2].ToString(),
-                                     MarketCap = csvSplit[3].ToString(),
-                                     ADR_TSO = csvSplit[4].ToString(),
-                                     IPOyear = csvSplit[5].ToString(),
-                                     Sector = csvSplit[7].ToString(),
-                                     Industry = csvSplit[6].ToString()
-                                 }).ToList();
+                    where !string.IsNullOrEmpty(row)
+                    let csvSplit = new Regex("((?<=\")[^\"]*(?=\"(,|$)+)|(?<=,|^)[^,\"]*(?=,|$))").Matches(row)
+                    let cols = row.Split(',')
+                    select new CompaniesViewModel()
+                    {
+                        Symbol = csvSplit[0].ToString(),
+                        Name = csvSplit[1].ToString(),
+                        LastSale = csvSplit[2].ToString(),
+                        MarketCap = csvSplit[3].ToString(),
+                        ADR_TSO = csvSplit[4].ToString(),
+                        IPOyear = csvSplit[5].ToString(),
+                        Sector = csvSplit[7].ToString(),
+                        Industry = csvSplit[6].ToString()
+                    }).ToList();
                 var reg = new Region { Name = CfgManager.NasdqRegion };
                 var regId = await _repository.AddRegion(reg);
                 //Write data in console


All step scope references are now handled as proxies to ensure that resources are properly disposed at the end of a step.

--- Summer.Batch.Core/Core/Unity/StepScope/StepScopeStrategy.cs
+++ Summer.Batch.Core/Core/Unity/StepScope/StepScopeStrategy.cs
@@ -53,11 +53,6 @@
             }

             var lifetimePolicy = context.Policies.GetNoDefault<ILifetimePolicy>(context.BuildKey, false);
-            if (lifetimePolicy is StepScopeLifetimeManager)
-            {
-                // the object being built is in the step scope, we don't need proxies for its dependencies
-                return;
-            }

             // Constructor parameters resolvers
             var constructorParameters = new Dictionary<string, StepScopeDependency>();


Remove commented out old history API

Remove commented out old history API

--- Algorithm/QCAlgorithm.cs
+++ Algorithm/QCAlgorithm.cs
@@ -1304,192 +1304,6 @@
             return localStartTime.ConvertTo(security.Exchange.TimeZone, TimeZone);
         }

-        ///// <summary>
-        ///// Gets the history for the specified symbol over the requested span. This function
-        ///// requires that the specified symbol has already been configured for receiving data and
-        ///// will use the configuration for values such as fill forward and extended market hours.
-        ///// </summary>
-        ///// <param name="symbol">The symbol to request historical data for</param>
-        ///// <param name="span">The span over which to request data. This is a calendar span, so take into consideration weekends and such</param>
-        ///// <returns>An enumerable of slice containing data over the most recent span for the specified configured security</returns>
-        //public IEnumerable<Slice> History(Symbol symbol, TimeSpan span)
-        //{
-        //    return History(new HistoryRequest(Securities[symbol], UtcTime - span, UtcTime));
-        //}
-
-        ///// <summary>
-        ///// Gets the requested number of bars of history for the specified symbol. This function
-        ///// requires that the specified symbol has already been configured for receiving data and
-        ///// will use the configuration for values such as fill forward and extended market hours.
-        ///// </summary>
-        ///// <param name="symbol">The symbol to request historical data for</param>
-        ///// <param name="periods">The number of trade bars to receive at the resolution.</param>
-        ///// <param name="resolution">The requested data resolution. This must not equal <see cref="Resolution.Tick"/></param>
-        ///// <returns>An enumerable of slice containing the specified number of bars at the specified resolution for the configured security</returns>
-        //public IEnumerable<Slice> History(Symbol symbol, int periods, Resolution resolution)
-        //{
-        //    if (resolution == Resolution.Tick) throw new ArgumentException("History functions that accept a bar count require that the resolution does not equal Resolution.Tick");
-        //    var security = Securities[symbol];
-        //    var config = security.SubscriptionDataConfig;
-        //    return History(symbol, periods, resolution, config.FillDataForward, config.ExtendedMarketHours);
-        //}
-
-        ///// <summary>
-        ///// Gets the requested number of bars of history for the specified symbol. This function
-        ///// requires that the specified symbol has already been configured for receiving data.
-        ///// </summary>
-        ///// <param name="symbol">The symbol to request historical data for</param>
-        ///// <param name="periods">The number of trade bars to receive at the resolution.</param>
-        ///// <param name="resolution">The requested data resolution. This must not equal <see cref="Resolution.Tick"/></param>
-        ///// <param name="fillForward">True to enable fill forward behavior, false otherwise</param>
-        ///// <param name="extendedMarket">True to receive pre and post market data, false for only normal market hours data</param>
-        ///// <returns>An enumerable of slice containing the specified number of bars at the specified resolution for the configured security</returns>
-        //public IEnumerable<Slice> History(Symbol symbol, int periods, Resolution resolution, bool fillForward, bool extendedMarket = false)
-        //{
-        //    if (resolution == Resolution.Tick) throw new ArgumentException("History functions that accept a bar count require that the resolution does not equal Resolution.Tick");
-        //    var security = Securities[symbol];
-        //    var start = QuantConnect.Time.GetStartTimeForTradeBars(security.Exchange.Hours, Time, resolution.ToTimeSpan(), periods, extendedMarket);
-        //    return History(new[] {symbol}, start, Time, resolution, fillForward, extendedMarket);
-        //}
-
-        ///// <summary>
-        ///// Gets the requested number of bars of history for the specified symbol. This function
-        ///// does NOT require that the specified symbol has been configured for receiving data.
-        ///// </summary>
-        ///// <param name="symbol">The symbol to request historical data for</param>
-        ///// <param name="securityType">The security type of the symbol. This  must not equal <see cref="SecurityType.Base"/> unless the symbol has been configured.</param>
-        ///// <param name="periods">The number of trade bars to receive at the resolution.</param>
-        ///// <param name="resolution">The requested data resolution. This must not equal <see cref="Resolution.Tick"/></param>
-        ///// <param name="fillForward">True to enable fill forward behavior, false otherwise</param>
-        ///// <param name="extendedMarket">True to receive pre and post market data, false for only normal market hours data</param>
-        ///// <returns>An enumerable of slice containing the specified number of bars at the specified resolution for the specified symbol</returns>
-        //public IEnumerable<Slice> History(Symbol symbol, SecurityType securityType, int periods, Resolution resolution, bool fillForward, bool extendedMarket = false)
-        //{
-        //    if (resolution == Resolution.Tick) throw new ArgumentException("History functions that accept a bar count require that the resolution does not equal Resolution.Tick");
-        //    Security security;
-        //    SecurityExchangeHours exchangeHours;
-        //    if (Securities.TryGetValue(symbol, out security) && securityType == security.Type)
-        //    {
-        //        exchangeHours = security.Exchange.Hours;
-        //    }
-        //    else if (securityType == SecurityType.Base)   exchangeHours = SecurityExchangeHours.AlwaysOpen(TimeZone);
-        //    else if (securityType == SecurityType.Equity) exchangeHours = _exchangeHoursProvider.GetExchangeHours("usa", symbol, SecurityType.Equity);
-        //    else if (securityType == SecurityType.Forex)  exchangeHours = _exchangeHoursProvider.GetExchangeHours("fxcm", symbol, SecurityType.Forex);
-        //    else throw new ArgumentException("The specified symbol/security type is not supported: " + symbol + " " + securityType);
-
-        //    var start = QuantConnect.Time.GetStartTimeForTradeBars(exchangeHours, Time, resolution.ToTimeSpan(), periods, extendedMarket);
-        //    return History(symbol, securityType, start, Time, resolution, fillForward, extendedMarket);
-        //}
-
-        ///// <summary>
-        ///// Gets the requested number of bars of history for the specified symbol. This function
-        ///// does NOT require that the specified symbol has been configured for receiving data.
-        ///// </summary>
-        ///// <param name="symbol">The symbol to request historical data for</param>
-        ///// <param name="securityType">The security type of the symbol. This  must not equal <see cref="SecurityType.Base"/> unless the symbol has been configured.</param>
-        ///// <param name="start">The start time of the historical data request</param>
-        ///// <param name="end">The end time of the historical data request</param>
-        ///// <param name="resolution">The requested data resolution. This must not equal <see cref="Resolution.Tick"/></param>
-        ///// <param name="fillForward">True to enable fill forward behavior, false otherwise</param>
-        ///// <param name="extendedMarket">True to receive pre and post market data, false for only normal market hours data</param>
-        ///// <param name="market">The market this symbol belongs to. If not specified, will default to 'usa' for equities and 'fxcm' for forex</param>
-        ///// <returns>An enumerable of slice containing the data over the requested period at the specified resolution for the specified symbol</returns>
-        //public IEnumerable<Slice> History(Symbol symbol, SecurityType securityType, DateTime start, DateTime end, Resolution resolution, bool fillForward, bool extendedMarket = false, string market = null)
-        //{
-        //    if (market == null)
-        //    {
-        //        if (securityType == SecurityType.Equity) market = "usa";
-        //        if (securityType == SecurityType.Forex)  market = "fxcm";
-        //    }
-
-        //    Security security;
-        //    SecurityExchangeHours exchangeHours;
-        //    if (Securities.TryGetValue(symbol, out security) && security.Type == securityType) exchangeHours = security.Exchange.Hours;
-        //    else if (securityType == SecurityType.Base) throw new ArgumentException("Unable to request history for unregistered custom data. Please add using the AddData method.");
-        //    else exchangeHours = _exchangeHoursProvider.GetExchangeHours(market, symbol, securityType);
-
-        //    var dataType = resolution == Resolution.Tick ? typeof(Tick) : typeof(TradeBar);
-        //    var fillForwardResolution = fillForward && resolution != Resolution.Tick ? resolution : (Resolution?)null;
-        //    var request = new HistoryRequest(start.ConvertToUtc(TimeZone), end.ConvertToUtc(TimeZone), dataType, symbol, securityType, resolution, market, exchangeHours, fillForwardResolution, extendedMarket, false);
-        //    return History(request);
-        //}
-
-        ///// <summary>
-        ///// Gets the requested number of bars of history for the specified symbols. This function
-        ///// requires that the specified symbols have already been configured for receiving data and
-        ///// will use the configuration for values such as fill forward and extended market hours.
-        ///// </summary>
-        ///// <param name="symbols">The symbols to request historical data for</param>
-        ///// <param name="periods">The number of trade bars to receive at the resolution for each symbol.</param>
-        ///// <param name="resolution">The requested data resolution. This must not equal <see cref="Resolution.Tick"/></param>
-        ///// <returns>An enumerable of slice containing the specified number of bars at the specified resolution for the configured securities</returns>
-        //public IEnumerable<Slice> History(IEnumerable<Symbol> symbols, int periods, Resolution resolution)
-        //{
-        //    if (resolution == Resolution.Tick) throw new ArgumentException("History functions that accept a bar count require that the resolution does not equal Resolution.Tick");
-        //    return History(symbols, periods, resolution, true);
-        //}
-
-        ///// <summary>
-        ///// Gets the requested number of bars of history for the specified symbols. This function
-        ///// requires that the specified symbols have already been configured for receiving data.
-        ///// </summary>
-        ///// <param name="symbols">The symbols to request historical data for</param>
-        ///// <param name="periods">The number of trade bars to receive at the resolution for each symbol.</param>
-        ///// <param name="resolution">The requested data resolution. This must not equal <see cref="Resolution.Tick"/></param>
-        ///// <param name="fillForward">True to enable fill forward behavior, false otherwise</param>
-        ///// <param name="extendedMarket">True to receive pre and post market data, false for only normal market hours data</param>
-        ///// <returns>An enumerable of slice containing the specified number of bars at the specified resolution for the configured securities</returns>
-        //public IEnumerable<Slice> History(IEnumerable<Symbol> symbols, int periods, Resolution resolution, bool fillForward, bool extendedMarket = false)
-        //{
-        //    if (resolution == Resolution.Tick) throw new ArgumentException("History functions that accept a bar count require that the resolution does not equal Resolution.Tick");
-        //    var requests = symbols.Select(symbol =>
-        //    {
-        //        var security = Securities[symbol];
-        //        var config = security.SubscriptionDataConfig;
-        //        var securityTimeZone = config.TimeZone;
-        //        var start = QuantConnect.Time.GetStartTimeForTradeBars(security.Exchange.Hours, security.LocalTime, resolution.ToTimeSpan(), periods, extendedMarket).ConvertToUtc(securityTimeZone);
-        //        var end = security.LocalTime.ConvertToUtc(securityTimeZone);
-        //        return new HistoryRequest(start, end, config.Type, symbol, security.Type, resolution, config.Market, security.Exchange.Hours, fillForward ? resolution : (Resolution?) null, extendedMarket, config.IsCustomData);
-        //    });
-        //    return History(requests, TimeZone);
-        //}
-
-        ///// <summary>
-        ///// Gets the requested number of bars of history for the specified symbols. This function
-        ///// requires that the specified symbols have already been configured for receiving data.
-        ///// </summary>
-        ///// <param name="symbols">The symbols to request historical data for</param>
-        ///// <param name="start">The start time of the historical data request</param>
-        ///// <param name="end">The end time of the historical data request</param>
-        ///// <param name="resolution">The requested data resolution. This must not equal <see cref="Resolution.Tick"/></param>
-        ///// <param name="fillForward">True to enable fill forward behavior, false otherwise</param>
-        ///// <param name="extendedMarket">True to receive pre and post market data, false for only normal market hours data</param>
-        ///// <returns>An enumerable of slice containing the specified number of bars at the specified resolution for the configured securities</returns>
-        //public IEnumerable<Slice> History(IEnumerable<Symbol> symbols, DateTime start, DateTime end, Resolution resolution, bool fillForward, bool extendedMarket = false)
-        //{
-        //    start = start.ConvertToUtc(TimeZone);
-        //    end = end.ConvertToUtc(TimeZone);
-        //    var requests = symbols.Select(symbol =>
-        //    {
-        //        // this overload requires that the symbols exist
-        //        var security = Securities[symbol];
-        //        var config = security.SubscriptionDataConfig;
-        //        return new HistoryRequest(start,
-        //            end,
-        //            config.Type,
-        //            symbol,
-        //            security.Type,
-        //            resolution,
-        //            config.Market,
-        //            security.Exchange.Hours,
-        //            fillForward ? resolution : (Resolution?) null,
-        //            extendedMarket,
-        //            config.IsCustomData
-        //            );
-        //    });
-        //    return History(requests, TimeZone);
-        //}
-
         /// <summary>
         /// Executes the specified history request
         /// </summary>


Updated layout for local bootstrap

Updated layout for local bootstrap

--- src/MinecraftStatus/Views/Shared/_Layout.cshtml
+++ src/MinecraftStatus/Views/Shared/_Layout.cshtml
@@ -6,16 +6,8 @@
     <title>@ViewData["Title"] - Minecraft Status</title>

     <!--CSS-->
-    <environment names="Development">
-        <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
-        <link rel="stylesheet" href="~/css/site.css" />
-    </environment>
-    <environment names="Staging,Production">
-        <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/css/bootstrap.min.css"
-              asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
-              asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
-        <link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
-    </environment>
+    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
+    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />

     <!--JS-->
     <environment names="Development">


update

update

--- TaskCoordinatorTest/SharedTypes/Shared/DbConnectionScope.cs
+++ TaskCoordinatorTest/SharedTypes/Shared/DbConnectionScope.cs
@@ -94,7 +94,7 @@
         }
 #endif

-        #region class fields
+#region class fields
         private static ConcurrentDictionary<Guid, WeakReference<DbConnectionScope>> __scopeStore = new ConcurrentDictionary<Guid, WeakReference<DbConnectionScope>>();

         private static DbConnectionScope __currentScope
@@ -143,7 +143,18 @@
         private bool _isDisposed;
 #endregion

-#region public class methods and properties
+#region class methods and properties
+        private static string GetConnectionID(string connectionString)
+        {
+            string transId = string.Empty;
+            var currTran = Transaction.Current;
+            if (currTran != null)
+            {
+                transId = currTran.TransactionInformation.LocalIdentifier;
+            }
+            return string.Format("{0}:{1}", transId, connectionString);
+        }
+
         /// <summary>
         /// Obtain the currently active connection scope
         /// </summary>
@@ -158,7 +169,6 @@
 #endregion

 #region public instance methods and properties
-
         /// <summary>
         /// Default Constructor
         /// </summary>
@@ -212,6 +222,61 @@
             }
         }

+        public DbConnection GetConnection(DbProviderFactory factory, string connectionString)
+        {
+            string id;
+            return GetConnectionInternal(factory, connectionString, out id);
+        }
+
+        public DbConnection GetOpenConnection(DbProviderFactory factory, string connectionString)
+        {
+            string id;
+            DbConnection result = this.GetConnectionInternal(factory, connectionString, out id);
+            try
+            {
+                lock (_namedlocker.GetLock(id))
+                {
+                    if (result.State == ConnectionState.Closed)
+                        result.Open();
+                }
+                _namedlocker.RemoveLock(id);
+                return result;
+            }
+            catch
+            {
+                _namedlocker.RemoveLock(id);
+                TryRemoveConnection(result);
+                throw;
+            }
+        }
+
+        public bool IsDisposed
+        {
+            get
+            {
+                return _isDisposed;
+            }
+        }
+#endregion
+
+#region private methods and properties
+        private DbConnection GetConnectionInternal(DbProviderFactory factory, string connectionString, out string id)
+        {
+            DbConnection result = null;
+            id = null;
+            lock (this.SyncRoot)
+            {
+                id = GetConnectionID(connectionString);
+                if (!TryGetConnectionById(id, out result))
+                {
+                    result = factory.CreateConnection();
+                    result.ConnectionString = connectionString;
+                    _connections.TryAdd(id, result);
+                }
+            }
+            return result;
+        }
+
         private bool TryGetConnectionById(string id, out DbConnection connection)
         {
             connection = null;
@@ -236,7 +301,8 @@
                         break;
                     }
                 }
-                if (!string.IsNullOrEmpty(key)){
+                if (!string.IsNullOrEmpty(key))
+                {
                     DbConnection tmp;
                     return _connections.TryRemove(key, out tmp);
                 }
@@ -244,70 +310,6 @@
             }
         }

-        private static string GetConnectionID(string connectionString)
-        {
-            string transId = string.Empty;
-            var currTran = Transaction.Current;
-            if (currTran != null)
-            {
-               transId =  currTran.TransactionInformation.LocalIdentifier;
-            }
-            return string.Format("{0}:{1}", transId, connectionString);
-        }
-
-        private DbConnection GetConnectionInternal(DbProviderFactory factory, string connectionString, out string id)
-        {
-            DbConnection result = null;
-            id = null;
-            lock (this.SyncRoot)
-            {
-                id = GetConnectionID(connectionString);
-                if (!TryGetConnectionById(id, out result))
-                {
-                    result = factory.CreateConnection();
-                    result.ConnectionString = connectionString;
-                    _connections.TryAdd(id, result);
-                }
-            }
-            return result;
-        }
-
-        public DbConnection GetConnection(DbProviderFactory factory, string connectionString)
-        {
-            string id;
-            return GetConnectionInternal(factory, connectionString, out id);
-        }
-
-        public DbConnection GetOpenConnection(DbProviderFactory factory, string connectionString)
-        {
-            string id;
-            DbConnection result = this.GetConnectionInternal(factory, connectionString, out id);
-            try
-            {
-                lock (_namedlocker.GetLock(id))
-                {
-                    if (result.State == ConnectionState.Closed)
-                        result.Open();
-                    return result;
-                }
-            }
-            catch
-            {
-                TryRemoveConnection(result);
-                throw;
-            }
-        }
-
-        public bool IsDisposed
-        {
-            get
-            {
-                return _isDisposed;
-            }
-        }
-#endregion
-
-#region private methods and properties
         /// <summary>
         /// Handle calling API function after instance has been disposed
         /// </summary>


add messages to argumentexceptions

add messages to argumentexceptions

--- src/NetCoreForce.Client/AuthenticationClient.cs
+++ src/NetCoreForce.Client/AuthenticationClient.cs
@@ -123,12 +123,12 @@
             Stopwatch sw = new Stopwatch();
             sw.Start();
 #endif
-            if (string.IsNullOrEmpty(clientId)) throw new ArgumentNullException("clientId");
-            if (string.IsNullOrEmpty(clientSecret)) throw new ArgumentNullException("clientSecret");
-            if (string.IsNullOrEmpty(username)) throw new ArgumentNullException("username");
-            if (string.IsNullOrEmpty(password)) throw new ArgumentNullException("password");
-            if (string.IsNullOrEmpty(tokenRequestEndpointUrl)) throw new ArgumentNullException("tokenRequestEndpointUrl");
-            if (!Uri.IsWellFormedUriString(tokenRequestEndpointUrl, UriKind.Absolute)) throw new FormatException("tokenRequestEndpointUrl");
+            if (string.IsNullOrEmpty(clientId)) throw new ArgumentNullException("clientId", "Client ID is null or empty");
+            if (string.IsNullOrEmpty(clientSecret)) throw new ArgumentNullException("clientSecret", "Client Secret is null or empty");
+            if (string.IsNullOrEmpty(username)) throw new ArgumentNullException("username", "Username is null or empty");
+            if (string.IsNullOrEmpty(password)) throw new ArgumentNullException("password", "Password is null or empty");
+            if (string.IsNullOrEmpty(tokenRequestEndpointUrl)) throw new ArgumentNullException("tokenRequestEndpointUrl", "Token Request Endpoint is null or empty");
+            if (!Uri.IsWellFormedUriString(tokenRequestEndpointUrl, UriKind.Absolute)) throw new FormatException("Invalid tokenRequestEndpointUrl");

             var content = new FormUrlEncodedContent(new[]
                 {


Apply fixes from Andrew Lock's blog post

https://andrewlock.net/viewing-overriden-configuration-values-in-aspnetcore/

--- src/Oakton/Descriptions/ConfigurationPreview.cs
+++ src/Oakton/Descriptions/ConfigurationPreview.cs
@@ -5,13 +5,12 @@
 namespace Oakton.Descriptions
 {
     using System.Collections.Generic;
-    using System.Linq;
     using Spectre.Console;

     internal class ConfigurationPreview : IDescribedSystemPart, IWriteToConsole
     {
+        private const string PreviewErrorMessage = "Unable to show a preview of the configuration.";
         private readonly IConfiguration _configuration;
-        private const string PreviewErrorMessage = "Unable to show a preview of the configuration.";

         public ConfigurationPreview(IConfiguration configuration)
         {
@@ -34,7 +33,7 @@

         public Task WriteToConsole()
         {
-            if (this._configuration is not IConfigurationRoot root)
+            if (!(_configuration is IConfigurationRoot root))
             {
                 AnsiConsole.MarkupLine($"[red]{PreviewErrorMessage}[/]");
                 return Task.CompletedTask;
@@ -53,27 +52,31 @@
                     }
                     else
                     {
-                        var current = valuesAndProviders.Pop();
-                        var currentNode = node.AddNode(new Table()
-                            .Border(TableBorder.None)
-                            .HideHeaders()
-                            .AddColumn("Key")
-                            .AddColumn("Value")
-                            .AddColumn("Provider")
-                            .HideHeaders()
-                            .AddRow($"[yellow]{child.Key}[/]", current.Value, $@"([grey]{current.Provider}[/])")
-                        );
-
-                        // Add the overriden values
-                        foreach (var valueAndProvider in valuesAndProviders)
-                        {
-                            currentNode.AddNode(new Table()
+                        // Remove the last value added to the stack. This is the "current" value
+                        var finalValue = valuesAndProviders.Pop();
+                        var currentNode = node.AddNode(
+                            new Table()
                                 .Border(TableBorder.None)
                                 .HideHeaders()
+                                .AddColumn("Key")
                                 .AddColumn("Value")
                                 .AddColumn("Provider")
                                 .HideHeaders()
-                                .AddRow($"[strikethrough]{child.Value}[/]", $@"([grey]{current.Provider}[/])")
+                                .AddRow($"[yellow]{child.Key}[/]", finalValue.Value, $@"([grey]{finalValue.Provider}[/])")
+                        );
+
+                        // Loop through the remaining (overridden) values
+                        // Display them as children of the current value
+                        foreach (var overriddenValue in valuesAndProviders)
+                        {
+                            currentNode.AddNode(
+                                new Table()
+                                    .Border(TableBorder.None)
+                                    .HideHeaders()
+                                    .AddColumn("Value")
+                                    .AddColumn("Provider")
+                                    .HideHeaders()
+                                    .AddRow($"[strikethrough]{overriddenValue.Value}[/]", $@"([grey]{overriddenValue.Provider}[/])")
                             );
                         }
                     }
@@ -95,8 +98,9 @@
             IConfigurationRoot root,
             string key)
         {
+            // Return matching values from all providers, not just the final val
             var stack = new Stack<(string, IConfigurationProvider)>();
-            foreach (IConfigurationProvider provider in root.Providers.Reverse())
+            foreach (IConfigurationProvider provider in root.Providers)
             {
                 if (provider.TryGet(key, out string value))
                 {


Removed obsolete routing qualifier

Removed obsolete routing qualifier

--- UI.MVC4/Controllers/API/OrganizationUnitRightsController.cs
+++ UI.MVC4/Controllers/API/OrganizationUnitRightsController.cs
@@ -26,7 +26,7 @@
         /// <param name="id">Id of the unit</param>
         /// <param name="rights">Routing qualifier</param>
         /// <returns>List of rights</returns>
-        public override HttpResponseMessage GetRights(int id, bool? rights)
+        public override HttpResponseMessage GetRights(int id)
         {
             try
             {


added LineIterator sample

added LineIterator sample

--- src/OpenCvSharp/modules/imgproc/LineIterator.cs
+++ src/OpenCvSharp/modules/imgproc/LineIterator.cs
@@ -12,8 +12,14 @@
     {
         private bool disposed;

-        /// <summary>
-        /// Intializes the iterator
+        private Mat img;
+        private Point pt1;
+        private Point pt2;
+        private PixelConnectivity connectivity;
+        private bool leftToRight;
+
+        /// <summary>
+        /// Constructor
         /// </summary>
         /// <param name="img"></param>
         /// <param name="pt1"></param>
@@ -30,8 +36,26 @@
         {
             if (img == null)
                 throw new ArgumentNullException("img");
+            this.img = img;
+            this.pt1 = pt1;
+            this.pt2 = pt2;
+            this.connectivity = connectivity;
+            this.leftToRight = leftToRight;
+        }
+
+        /// <summary>
+        /// Intializes the iterator
+        /// </summary>
+        /// <returns></returns>
+        private void Initialize()
+        {
+            if (ptr != IntPtr.Zero)
+                throw new OpenCvSharpException("invalid state");
+            img.ThrowIfDisposed();
+
             ptr = NativeMethods.imgproc_LineIterator_new(
                 img.CvPtr, pt1, pt2, (int)connectivity, leftToRight ? 1 : 0);
+            disposed = false;
         }

 #if LANG_JP
@@ -83,8 +107,10 @@
         /// <returns></returns>
         public IEnumerator<Pixel> GetEnumerator()
         {
-            if (disposed)
-                throw new ObjectDisposedException(GetType().Name);
+            //if (disposed)
+            //    throw new ObjectDisposedException(GetType().Name);
+            Dispose();
+            Initialize();

             int count = NativeMethods.imgproc_LineIterator_count_get(ptr);
             for (int i = 0; i < count; i++)
@@ -92,6 +118,8 @@
                 Point pos = NativeMethods.imgproc_LineIterator_pos(ptr);
                 IntPtr value = NativeMethods.imgproc_LineIterator_operatorEntity(ptr);
                 yield return new Pixel(pos, value);
+
+                NativeMethods.imgproc_LineIterator_operatorPP(ptr);
             }
         }

@@ -113,6 +141,123 @@
                     throw new ObjectDisposedException(GetType().Name);
                 return NativeMethods.imgproc_LineIterator_ptr_get(ptr);
             }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public IntPtr Ptr0
+        {
+            get
+            {
+                if (disposed)
+                    throw new ObjectDisposedException(GetType().Name);
+                return NativeMethods.imgproc_LineIterator_ptr0_get(ptr);
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public int Step
+        {
+            get
+            {
+                if (disposed)
+                    throw new ObjectDisposedException(GetType().Name);
+                return NativeMethods.imgproc_LineIterator_step_get(ptr);
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public int ElemSize
+        {
+            get
+            {
+                if (disposed)
+                    throw new ObjectDisposedException(GetType().Name);
+                return NativeMethods.imgproc_LineIterator_elemSize_get(ptr);
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public int Err
+        {
+            get
+            {
+                if (disposed)
+                    throw new ObjectDisposedException(GetType().Name);
+                return NativeMethods.imgproc_LineIterator_err_get(ptr);
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public int Count
+        {
+            get
+            {
+                if (disposed)
+                    throw new ObjectDisposedException(GetType().Name);
+                return NativeMethods.imgproc_LineIterator_count_get(ptr);
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public int MinusDelta
+        {
+            get
+            {
+                if (disposed)
+                    throw new ObjectDisposedException(GetType().Name);
+                return NativeMethods.imgproc_LineIterator_minusDelta_get(ptr);
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public int PlusDelta
+        {
+            get
+            {
+                if (disposed)
+                    throw new ObjectDisposedException(GetType().Name);
+                return NativeMethods.imgproc_LineIterator_plusDelta_get(ptr);
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public int MinusStep
+        {
+            get
+            {
+                if (disposed)
+                    throw new ObjectDisposedException(GetType().Name);
+                return NativeMethods.imgproc_LineIterator_minusStep_get(ptr);
+            }
+        }
+
+        /// <summary>
+        ///
+        /// </summary>
+        public int PlusStep
+        {
+            get
+            {
+                if (disposed)
+                    throw new ObjectDisposedException(GetType().Name);
+                return NativeMethods.imgproc_LineIterator_plusStep_get(ptr);
+            }
         }

         #endregion
@@ -157,6 +302,17 @@
             }

             /// <summary>
+            ///
+            /// </summary>
+            /// <typeparam name="T"></typeparam>
+            /// <param name="value"></param>
+            /// <returns></returns>
+            public void SetValue<T>(T value) where T : struct
+            {
+                Marshal.StructureToPtr(value, Value, false);
+            }
+
+            /// <summary>
             /// Constructor
             /// </summary>
             /// <param name="pos"></param>


fix github issues

fix github issues

--- src/OpenInApp.Command/MenuItemCallBackHelper.cs
+++ src/OpenInApp.Command/MenuItemCallBackHelper.cs
@@ -33,9 +33,10 @@
                     var badFilePath = dto.KeyToExecutableEnum.ToString();
                     persistOptionsDto = fileHelper.PromptForActualExeFile(badFilePath);

-                    var newActualPathToExeExists = ArtefactsHelper.DoesActualPathToExeExist(dto.ActualPathToExe);
+                    var newActualPathToExeExists = ArtefactsHelper.DoesActualPathToExeExist(persistOptionsDto.ValueToPersist);
                     if (newActualPathToExeExists)
                     {
+                        dto.ActualPathToExe = persistOptionsDto.ValueToPersist;
                         proceedToExecute = true;
                     }
                     else
@@ -106,9 +107,9 @@
                                         }
                                     }

-                                    OpenInAppHelper.InvokeCommand(actualArtefacts,
-                                        dto.ActualPathToExe,
-                                        dto.SeparateProcessPerFileToBeOpened,
+                                    OpenInAppHelper.InvokeCommand(actualArtefacts,
+                                        dto.ActualPathToExe,
+                                        dto.SeparateProcessPerFileToBeOpened,
                                         dto.UseShellExecute,
                                         dto.ArtefactTypeToOpen,
                                         dto.ProcessWithinProcess);


Fix Zero Hour translations

Fix Zero Hour translations

--- src/OpenSage.Game/Content/TranslationManager.cs
+++ src/OpenSage.Game/Content/TranslationManager.cs
@@ -15,13 +15,10 @@
             switch (game)
             {
                 case SageGame.CncGenerals:
+                case SageGame.CncGeneralsZeroHour:
                     csfEntry = fileSystem.GetFile(@"Data\English\generals.csf");
                     break;
-                case SageGame.CncGeneralsZeroHour:
-                    break;
                 case SageGame.BattleForMiddleEarth:
-                    csfEntry = fileSystem.GetFile(@"lotr.csf");
-                    break;
                 case SageGame.BattleForMiddleEarthII:
                     csfEntry = fileSystem.GetFile(@"lotr.csf");
                     break;


CA-310980: Show successful completed status on the patching page when no action is to be taken.

Signed-off-by: Konstantina Chremmou <a7d1f757a659045fb6db8c1e3849a1c8ad00b97a@citrix.com>

--- XenAdmin/Wizards/PatchingWizard/AutomatedUpdatesBasePage.cs
+++ XenAdmin/Wizards/PatchingWizard/AutomatedUpdatesBasePage.cs
@@ -131,6 +131,8 @@
             {
                 Status = Status.Completed;
                 _thisPageIsCompleted = true;
+                UpdateStatusOnCompletion();
+                UpdateStatus();
                 OnPageUpdated();
             }
             else
@@ -252,7 +254,10 @@

         private void UpdateStatus()
         {
-            var newVal = backgroundWorkers.Sum(b => b.PercentComplete) / backgroundWorkers.Count;
+            var newVal = backgroundWorkers.Count > 0
+                ? backgroundWorkers.Sum(b => b.PercentComplete) / backgroundWorkers.Count
+                : 100;
+
             if (newVal < 0)
                 newVal = 0;
             else if (newVal > 100)
@@ -434,7 +439,7 @@
         {
             if (e.Cancelled)
             {
-                Status = Status.Completed;
+                Status = Status.Cancelled;
                 panel1.Visible = true;
                 labelError.Text = UserCancellationMessage();
                 pictureBox1.Image = Images.StaticImages.cancelled_action_16;
@@ -471,45 +476,48 @@
                     if (workerSucceeded)
                         bgw.PercentComplete = 100;
                 }
+
                 //if all finished
                 if (backgroundWorkers.All(w => !w.IsBusy))
-                {
-                    Status = Status.Completed;
-                    panel1.Visible = true;
-
-                    if (failedWorkers.Any())
-                    {
-                        labelError.Text = FailureMessageOnCompletion(backgroundWorkers.Count > 1);
-                        pictureBox1.Image = Images.StaticImages._000_error_h32bit_16;
-                        buttonRetry.Visible = true;
-                        buttonSkip.Visible = false;
-
-                        if (failedWorkers.Any(w => w.FirstFailedSkippableAction != null))
-                            buttonSkip.Visible = true;
-                    }
-
-                    else if (someWorkersCancelled)
-                    {
-                        labelError.Text = UserCancellationMessage();
-                        pictureBox1.Image = Images.StaticImages.cancelled_action_16;
-                        buttonRetry.Visible = buttonSkip.Visible = false;
-                    }
-
-                    else
-                    {
-                        labelError.Text = SuccessMessageOnCompletion(backgroundWorkers.Count > 1);
-                        pictureBox1.Image = Images.StaticImages._000_Tick_h32bit_16;
-                        buttonRetry.Visible = buttonSkip.Visible = false;
-                    }
-
-                    _thisPageIsCompleted = true;
-                    _cancelEnabled = false;
-                }
+                    UpdateStatusOnCompletion(someWorkersCancelled);
             }

             UpdateStatus();
             OnPageUpdated();
         }
+
+        private void UpdateStatusOnCompletion(bool someWorkersCancelled = false)
+        {
+            Status = Status.Completed;
+            panel1.Visible = true;
+
+            if (failedWorkers.Any())
+            {
+                labelError.Text = FailureMessageOnCompletion(backgroundWorkers.Count > 1);
+                pictureBox1.Image = Images.StaticImages._000_error_h32bit_16;
+                buttonRetry.Visible = true;
+                buttonSkip.Visible = false;
+
+                if (failedWorkers.Any(w => w.FirstFailedSkippableAction != null))
+                    buttonSkip.Visible = true;
+            }
+            else if (someWorkersCancelled)
+            {
+                labelError.Text = UserCancellationMessage();
+                pictureBox1.Image = Images.StaticImages.cancelled_action_16;
+                buttonRetry.Visible = buttonSkip.Visible = false;
+            }
+            else
+            {
+                labelError.Text = SuccessMessageOnCompletion(backgroundWorkers.Count > 1);
+                pictureBox1.Image = Images.StaticImages._000_Tick_h32bit_16;
+                buttonRetry.Visible = buttonSkip.Visible = false;
+            }
+
+            _thisPageIsCompleted = true;
+            _cancelEnabled = false;
+        }
+
         #endregion

         private void RetryFailedActions()


tweak

tweak

--- AmcacheParser/Program.cs
+++ AmcacheParser/Program.cs
@@ -932,12 +932,8 @@
                         .ConvertUsing(t => t.LinkDate?.ToString(_fluentCommandLineParser.Object.DateTimeFormat))
                         .Index(27);
                     foo.Map(m => m.LanguageID).Index(28);
-                    foo.Map(m => m.CompanyName).Ignore();
-                    foo.Map(m => m.SwitchBackContext).Ignore();
-

                     csv.Configuration.RegisterClassMap(foo);
-

                     if (_fluentCommandLineParser.Object.CsvSeparator == false)
                     {


Html: added DashStyle support

Html: added DashStyle support

--- src/Perspex.HtmlRenderer/Adapters/PenAdapter.cs
+++ src/Perspex.HtmlRenderer/Adapters/PenAdapter.cs
@@ -10,6 +10,7 @@
 // - Sun Tsu,
 // "The Art of War"

+using System.Collections.Generic;
 using Perspex.Media;
 using TheArtOfDev.HtmlRenderer.Adapters;
 using TheArtOfDev.HtmlRenderer.Adapters.Entities;
@@ -30,6 +31,8 @@
         /// the width of the pen
         /// </summary>
         private double _width;
+
+        private DashStyle _dashStyle;

         /// <summary>
         /// the dash style of the pen
@@ -52,41 +55,24 @@

         public override RDashStyle DashStyle
         {
-            set
-            {
-                //TODO: Implement DashStyles
-                /*
-                switch (value)
-                {
-                    case RDashStyle.Solid:
-                        _dashStyle = DashStyles.Solid;
-                        break;
-                    case RDashStyle.Dash:
-                        _dashStyle = DashStyles.Dash;
-                        break;
-                    case RDashStyle.Dot:
-                        _dashStyle = DashStyles.Dot;
-                        break;
-                    case RDashStyle.DashDot:
-                        _dashStyle = DashStyles.DashDot;
-                        break;
-                    case RDashStyle.DashDotDot:
-                        _dashStyle = DashStyles.DashDotDot;
-                        break;
-                    default:
-                        _dashStyle = DashStyles.Solid;
-                        break;
-                }*/
-            }
+            set { DashStyles.TryGetValue(value, out _dashStyle); }
         }
+
+        private static readonly Dictionary<RDashStyle, DashStyle> DashStyles = new Dictionary<RDashStyle, DashStyle>
+        {
+            {RDashStyle.Solid,null },
+            {RDashStyle.Dash, global::Perspex.Media.DashStyle.Dash },
+            {RDashStyle.DashDot, global::Perspex.Media.DashStyle.DashDot },
+            {RDashStyle.DashDotDot, global::Perspex.Media.DashStyle.DashDotDot },
+            {RDashStyle.Dot, global::Perspex.Media.DashStyle.Dot }
+        };

         /// <summary>
         /// Create the actual Perspex pen instance.
         /// </summary>
         public Pen CreatePen()
         {
-            var pen = new Pen(_brush, _width);
-            //pen.DashStyle = _dashStyle;
+            var pen = new Pen(_brush, _width, _dashStyle);
             return pen;
         }
     }


Updated Google Tag Manager Account

Updated Google Tag Manager Account

--- src/SFA.DAS.EAS.Web/Views/Shared/_Layout.cshtml
+++ src/SFA.DAS.EAS.Web/Views/Shared/_Layout.cshtml
@@ -44,7 +44,7 @@
 	new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
 	j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
 	'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
-	})(window,document,'script','dataLayer','GTM-T3CZC2');</script>
+    })(window, document, 'script', 'dataLayer', 'GTM-PFR238K');</script>
     <!-- End Google Tag Manager -->

     <script type="text/javascript">
@@ -64,7 +64,7 @@

     <!-- Google Tag Manager (noscript) -->
     <noscript>
-        <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-T3CZC2"
+        <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PFR238K"
                 height="0" width="0" style="display:none;visibility:hidden"></iframe>
     </noscript>
     <!-- End Google Tag Manager (noscript) -->


Fix dispose bug with reximage

Fix dispose bug with reximage

--- src/SadConsole.Shared/Readers/REXPaint.Image.cs
+++ src/SadConsole.Shared/Readers/REXPaint.Image.cs
@@ -145,45 +145,46 @@
         /// <returns>The RexPaint image.</returns>
         public static REXPaintImage Load(Stream stream)
         {
-            var deflatedStream = new GZipStream(stream, CompressionMode.Decompress);
+            using (var deflatedStream = new GZipStream(stream, CompressionMode.Decompress))
+            {
+                using (var reader = new BinaryReader(deflatedStream))
+                {
+                    var version = reader.ReadInt32();
+                    var layerCount = reader.ReadInt32();
+                    REXPaintImage image = null;

-            using (var reader = new BinaryReader(deflatedStream))
-            {
-                var version = reader.ReadInt32();
-                var layerCount = reader.ReadInt32();
-                REXPaintImage image = null;
+                    for (var currentLayer = 0; currentLayer < layerCount; currentLayer++)
+                    {
+                        var width = reader.ReadInt32();
+                        var height = reader.ReadInt32();

-                for (var currentLayer = 0; currentLayer < layerCount; currentLayer++)
-                {
-                    var width = reader.ReadInt32();
-                    var height = reader.ReadInt32();
+                        Layer layer;

-                    Layer layer;
+                        if (currentLayer == 0)
+                        {
+                            image = new REXPaintImage(width, height) { Version = version };
+                            layer = image._layers[0];
+                        }
+                        else
+                            layer = image.Create();

-                    if (currentLayer == 0)
-                    {
-                        image = new REXPaintImage(width, height) {Version = version};
-                        layer = image._layers[0];
-                    }
-                    else
-                        layer = image.Create();
+                        // Process cells (could probably be streamlined into index processing instead of x,y...
+                        for (var x = 0; x < width; x++)
+                        {
+                            for (var y = 0; y < height; y++)
+                            {

-                    // Process cells (could probably be streamlined into index processing instead of x,y...
-                    for (var x = 0; x < width; x++)
-                    {
-                        for (var y = 0; y < height; y++)
-                        {
+                                var cell = new Cell(reader.ReadInt32(),                                                  // character
+                                                    new Color(reader.ReadByte(), reader.ReadByte(), reader.ReadByte()),  // foreground
+                                                    new Color(reader.ReadByte(), reader.ReadByte(), reader.ReadByte())); // background

-                            var cell = new Cell(reader.ReadInt32(),                                                  // character
-                                                new Color(reader.ReadByte(), reader.ReadByte(), reader.ReadByte()),  // foreground
-                                                new Color(reader.ReadByte(), reader.ReadByte(), reader.ReadByte())); // background
-
-                            layer[x, y] = cell;
+                                layer[x, y] = cell;
+                            }
                         }
                     }
+
+                    return image;
                 }
-
-                return image;
             }
         }
     }


Dispose logger on shutdown of the file archive app, ensuring files are unlocked.

--- src/Seq.App.FileArchive/ArchiveWriterReactor.cs
+++ src/Seq.App.FileArchive/ArchiveWriterReactor.cs
@@ -13,7 +13,7 @@
     [SeqApp(
         "File Archive",
         Description = "Writes events to a set of rolling log files for long-term archival storage.")]
-    public class ArchiveWriterReactor : Reactor, ISubscribeTo<LogEventData>
+    public class ArchiveWriterReactor : Reactor, ISubscribeTo<LogEventData>, IDisposable
     {
         ILogger _archiveLogger;

@@ -33,6 +33,13 @@
                     retainedFileCountLimit: null,
                     outputTemplate: "{Timestamp} [{Level}] {Message:l}{NewLine:l}{ArchiveWriterException:l}")
                 .CreateLogger();
+        }
+
+        public void Dispose()
+        {
+            var disp = _archiveLogger as IDisposable;
+            if (disp != null)
+                disp.Dispose();
         }

         public void On(Event<LogEventData> evt)


261.3

--- src/SharpConnect.MySql/0_Public/MySqlCommand.cs
+++ src/SharpConnect.MySql/0_Public/MySqlCommand.cs
@@ -72,7 +72,7 @@
         }

         /// <summary>
-        /// async exec reader, notify when ready
+        /// async exec reader, notify the when reader is ready
         /// </summary>
         public void ExecuteReader(Action<MySqlDataReader> readerReady)
         {
@@ -96,7 +96,7 @@
             _query.Execute(true, () => { });//send empty lambda for async
         }
         /// <summary>
-        /// async exec,
+        /// async exec, on each sub table
         /// </summary>
         public void ExecuteReadEachSubTable(Action<MySqlSubTable> onEachSubTable)
         {


#H5IS some more

#H5IS some more

--- src/Skybrud.Umbraco.BorgerDk/BorgerDkHelpers.cs
+++ src/Skybrud.Umbraco.BorgerDk/BorgerDkHelpers.cs
@@ -57,7 +57,7 @@
                 {"id", article.Id},
                 {"domain", article.Domain},
                 {"url", article.Url},
-                {"municipality", BorgerDkMunicipality.AssensKommune.Code},
+                {"municipality", article.Municipality.Code},
                 {"title", HttpUtility.HtmlDecode(article.Title).Trim()},
                 {"header", HttpUtility.HtmlDecode(article.Header).Trim()},
                 {"published", GetUnixTimeFromDateTime(article.Published)},


renamed MoveItems to MoveItemsAsync

renamed MoveItems to MoveItemsAsync

--- src/XOMNI.SDK.Private/Catalog/ItemManagement.cs
+++ src/XOMNI.SDK.Private/Catalog/ItemManagement.cs
@@ -268,7 +268,7 @@
         /// </summary>
         /// <param name="defaultItemId">The id of the default item to move the variant items under.</param>
         /// <param name="variantItemIds">The ids of the items to move.</param>
-        public Task MoveItems(int defaultItemId, IEnumerable<int> variantItemIds)
+        public Task MoveItemsAsync(int defaultItemId, IEnumerable<int> variantItemIds)
         {
             return itemMove.MoveItemsAsync(defaultItemId, variantItemIds, base.ApiCredential);
         }


Refactor HandleAnimatedGORotation()

Refactor HandleAnimatedGORotation()

--- AnimationPathAnimator.cs
+++ AnimationPathAnimator.cs
@@ -807,10 +807,11 @@
         }

         private void HandleAnimatedGORotation() {
+            if (animatedGO == null) return;
+
             // Look at target.
-            if (animatedGO != null
-                && targetGO != null
-                && rotationMode != AnimatorRotationMode.Forward) {
+            if (targetGO != null
+                && rotationMode == AnimatorRotationMode.Target) {

                 // In play mode use Quaternion.Slerp();
                 if (Application.isPlaying) {
@@ -822,17 +823,11 @@
                 }
             }
             // Use rotation path.
-            if (animatedGO != null
-                // TODO Remove this condition.
-                && targetGO == null
-                && rotationMode != AnimatorRotationMode.Forward) {
-
+            if (rotationMode == AnimatorRotationMode.Custom) {
                 RotateObjectWithAnimationCurves();
             }
             // Look forward.
-            else if (animatedGO != null
-                && rotationMode == AnimatorRotationMode.Forward) {
-
+            else if (rotationMode == AnimatorRotationMode.Forward) {
                 Vector3 forwardPoint = GetForwardPoint();
 				var globalForwardPoint = transform.TransformPoint(forwardPoint);


refactoring

refactoring

--- AppMetrics/DataReader.cs
+++ AppMetrics/DataReader.cs
@@ -86,7 +86,7 @@
 			return res;
 		}

-		static DateTime GetSessionLastWriteTime(string filePath)
+		public static DateTime GetSessionLastWriteTime(string filePath)
 		{
 			using (var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
 			{


Use dirty flag for visibility instead of rechecking every block each frame

--- Assets/MapGen/GameMap.cs
+++ Assets/MapGen/GameMap.cs
@@ -43,6 +43,7 @@
     public int posX = 0;
     public int posY = 0;
     public int posZ = 0;
+    public bool posZDirty = true; // Set in GetViewInfo if z changes, and reset in HideMeshes after meshes hidden.
     public int map_x;
     public int map_y;
     public Text genStatus;
@@ -863,7 +864,15 @@
     }
     void GetViewInfo()
     {
-        connectionState.ViewInfoCall.execute(null, out connectionState.net_view_info);
+        if (connectionState.net_view_info == null) {
+            connectionState.ViewInfoCall.execute (null, out connectionState.net_view_info);
+        } else {
+            int oldZ = connectionState.net_view_info.cursor_pos_z;
+            connectionState.ViewInfoCall.execute (null, out connectionState.net_view_info);
+            if (oldZ != connectionState.net_view_info.cursor_pos_z) {
+                posZDirty = true;
+            }
+        }
     }

     void PositionCamera()
@@ -915,6 +924,8 @@

     void HideMeshes()
     {
+        if (!posZDirty) return;
+        posZDirty = false;
         for (int zz = 0; zz < blocks.GetLength(2); zz++)
             for (int yy = 0; yy < blocks.GetLength(1); yy++)
                 for (int xx = 0; xx < blocks.GetLength(0); xx++)


Enable offline mode by default.

Enable offline mode by default.

--- Assets/NetworkManager.cs
+++ Assets/NetworkManager.cs
@@ -4,6 +4,7 @@

 public class NetworkManager : MonoBehaviour {
     public List<string> ChatMessages;
+    public bool IsOfflineMode;

     // Goal #1: Create a reasonable chat system using the NEW UI System
     public void AddChatMessage(string message) {
@@ -23,7 +24,12 @@
         PhotonNetwork.player.name = PlayerPrefs.GetString("Username", "Matt");
         ChatMessages = new List<string>();

-        Connect();
+        if (IsOfflineMode) {
+            PhotonNetwork.offlineMode = true;
+            OnJoinedLobby();
+        } else {
+            Connect();
+        }
     }

     void Update() {


hello ada

hello ada

--- Ada/AdaW10/Models/VoiceInterface/VoiceInterface.cs
+++ Ada/AdaW10/Models/VoiceInterface/VoiceInterface.cs
@@ -127,9 +127,7 @@
         {
             using (var sttService = new SttService())
             {
-                await TtsService.SayAsync(SpeechDictionnary.GetReasonSentence());
-
-                await sttService.AddConstraintAsync(ConstraintsDictionnary.ConstraintForOtherWords);
+                await TtsService.SayAsync("Bonjour");

                 var result = await sttService.RecognizeAsync();


Fix build break: Add `ObjectPoolProvider` to DI in integration tests

--- test/MusicStore.Test/ShoppingCartControllerTest.cs
+++ test/MusicStore.Test/ShoppingCartControllerTest.cs
@@ -11,6 +11,7 @@
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.EntityFrameworkCore;
 using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.ObjectPool;
 using Microsoft.Extensions.Primitives;
 using MusicStore.Models;
 using MusicStore.ViewModels;
@@ -27,8 +28,9 @@
             var efServiceProvider = new ServiceCollection().AddEntityFrameworkInMemoryDatabase().BuildServiceProvider();

             var services = new ServiceCollection();
-
-            services.AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase().UseInternalServiceProvider(efServiceProvider));
+            services
+                .AddSingleton<ObjectPoolProvider, DefaultObjectPoolProvider>()
+                .AddDbContext<MusicStoreContext>(b => b.UseInMemoryDatabase().UseInternalServiceProvider(efServiceProvider));

             services.AddMvc();


cmdのユーティリティルーチンを使う様に変更

cmdのユーティリティルーチンを使う様に変更

--- AbaqusModel/Parser.cs
+++ AbaqusModel/Parser.cs
@@ -180,11 +180,9 @@
         private void parse_element(Command cmd)
         {
             cmd.must_be(Keyword.ELEMENT);
-
-            if (!cmd.Has("TYPE"))
-                throw new InvalidFormatException("Element");
-
-            var type = cmd.parameters["TYPE"];
+            cmd.must_have("TYPE");
+
+            var type = cmd["TYPE"];

             // 継続行（最後がカンマ）をまとめる
             bool cont = false;


Added Pressed and Released events to the Gesture Manager so that UI elements can provide additional feedback to the user. A button should have focus, down, and up visual states so that the user knows their intent is being captured. The down state can also help with gesture feedback.

--- Assets/HoloToolkit/Input/Scripts/GestureManager.cs
+++ Assets/HoloToolkit/Input/Scripts/GestureManager.cs
@@ -86,6 +86,8 @@
         // we want for manipulation
         private GestureRecognizer manipulationRecognizer;

+        private bool hasRecognitionStarted = false;
+
         private bool HandPressed { get { return pressedHands.Count > 0; } }
         private HashSet<uint> pressedHands = new HashSet<uint>();

@@ -107,6 +109,11 @@

             gestureRecognizer.TappedEvent += GestureRecognizer_TappedEvent;

+            // We need to send pressed and released events to UI so they can provide visual feedback
+            // of the current state of the UI based on user input.
+            gestureRecognizer.RecognitionStartedEvent += GestureRecognizer_RecognitionStartedEvent;
+            gestureRecognizer.RecognitionEndedEvent += GestureRecogniser_RecognitionEndedEvent;
+
             manipulationRecognizer.ManipulationStartedEvent += ManipulationRecognizer_ManipulationStartedEvent;
             manipulationRecognizer.ManipulationUpdatedEvent += ManipulationRecognizer_ManipulationUpdatedEvent;
             manipulationRecognizer.ManipulationCompletedEvent += ManipulationRecognizer_ManipulationCompletedEvent;
@@ -116,7 +123,7 @@
             gestureRecognizer.StartCapturingGestures();
             manipulationRecognizer.StartCapturingGestures();
         }
-
+
         private void InteractionManager_SourcePressed(InteractionSourceState state)
         {
             if (!HandPressed)
@@ -150,12 +157,41 @@
             OnTap();
         }

+        private void GestureRecognizer_RecognitionStartedEvent(InteractionSourceKind source, Ray headRay)
+        {
+            OnRecognitionStarted();
+        }
+
+        private void GestureRecogniser_RecognitionEndedEvent(InteractionSourceKind source, Ray headRay)
+        {
+            OnRecognitionEndeded();
+        }
+
         private void OnTap()
         {
             if (FocusedObject != null)
             {
                 FocusedObject.SendMessage("OnSelect", SendMessageOptions.DontRequireReceiver);
             }
+        }
+
+        private void OnRecognitionStarted()
+        {
+            if (FocusedObject != null)
+            {
+                hasRecognitionStarted = true;
+                FocusedObject.SendMessage("OnPressed", SendMessageOptions.DontRequireReceiver);
+            }
+        }
+
+        private void OnRecognitionEndeded()
+        {
+            if (FocusedObject != null && hasRecognitionStarted)
+            {
+                FocusedObject.SendMessage("OnReleased", SendMessageOptions.DontRequireReceiver);
+            }
+
+            hasRecognitionStarted = false;
         }

         private void ManipulationRecognizer_ManipulationStartedEvent(InteractionSourceKind source, Vector3 cumulativeDelta, Ray headRay)
@@ -202,6 +238,8 @@

         void LateUpdate()
         {
+            // set the next focus object to see if focus has changed, but don't replace the current focused object
+            // until all the inputs are handled, like Unity Editor input for OnTap().
             GameObject newFocusedObject;

             if (GazeManager.Instance.Hit &&
@@ -218,27 +256,36 @@
                 newFocusedObject = OverrideFocusedObject;
             }

-            if (FocusedObject != newFocusedObject)
-            {
-                // If the currently focused object doesn't match the old focused object, cancel the current gesture.
+            bool focusedChanged = FocusedObject != newFocusedObject;
+
+#if UNITY_EDITOR
+            if (Input.GetMouseButtonDown(1) || Input.GetKeyDown(EditorSelectKey))
+            {
+                OnTap();
+                OnRecognitionStarted();
+            }
+
+            if (Input.GetMouseButtonUp(1) || Input.GetKeyUp(EditorSelectKey) || focusedChanged)
+            {
+                OnRecognitionEndeded();
+            }
+#endif
+            if (focusedChanged)
+            {
+                // If the currently focused object doesn't match the new focused object, cancel the current gesture.
                 // Start looking for new gestures.  This is to prevent applying gestures from one hologram to another.
                 gestureRecognizer.CancelGestures();
                 FocusedObject = newFocusedObject;
                 gestureRecognizer.StartCapturingGestures();
             }
-
-#if UNITY_EDITOR
-            if (Input.GetMouseButtonDown(1) || Input.GetKeyDown(EditorSelectKey))
-            {
-                OnTap();
-            }
-#endif
         }

         void OnDestroy()
         {
             gestureRecognizer.StopCapturingGestures();
             gestureRecognizer.TappedEvent -= GestureRecognizer_TappedEvent;
+            gestureRecognizer.RecognitionStartedEvent -= GestureRecognizer_RecognitionStartedEvent;
+            gestureRecognizer.RecognitionEndedEvent -= GestureRecogniser_RecognitionEndedEvent;

             manipulationRecognizer.StopCapturingGestures();
             manipulationRecognizer.ManipulationStartedEvent -= ManipulationRecognizer_ManipulationStartedEvent;


fix accidental checkin

fix accidental checkin

--- BitSharp.Core/Domain/Builders/ChainStateBuilder.cs
+++ BitSharp.Core/Domain/Builders/ChainStateBuilder.cs
@@ -270,7 +270,6 @@
                     try
                     {
                         this.rules.ValidationTransactionScript(block, tuple.Item1, tuple.Item2, tuple.Item3, tuple.Item4, tuple.Item5);
-                        throw new Exception();
                     }
                     catch (Exception e)
                     {


lock-in current target block when there is a work tie

--- BitSharp.Core/Storage/Memory/MemoryBlockStorage.cs
+++ BitSharp.Core/Storage/Memory/MemoryBlockStorage.cs
@@ -61,6 +61,11 @@
             return this.chainedHeaders.Values;
         }

+        public bool IsBlockInvalid(UInt256 blockHash)
+        {
+            return this.invalidBlocks.Contains(blockHash);
+        }
+
         public void MarkBlockInvalid(UInt256 blockHash)
         {
             this.invalidBlocks.Add(blockHash);


fixed string compararer that was caching the string field and not updating it.
courtesy Bryce Jassmond (bjassmond)

--HG--
branch : stable

--- Assets/UnityTestTools/Assertions/MemberResolver.cs
+++ Assets/UnityTestTools/Assertions/MemberResolver.cs
@@ -42,8 +42,11 @@
                 var member = fullCallStack[i];
                 result = GetValueFromMember(result, member);
                 tempCallstack.Add(member);
-                if (result == null) return null;
-                if (!IsValueType(result.GetType()))
+				if (result == null) return null;
+				var type = result.GetType();
+
+				//String is not a value type but we don't want to cache it
+				if (!IsValueType(type) && type != typeof(System.String))
                 {
                     tempCallstack.Clear();
                     m_CallingObjectRef = result;


Fixed guide-lines on latest patch. (public method signature changed)

--- Src/PrecisionEngineering/Data/Calculations/Guides.cs
+++ Src/PrecisionEngineering/Data/Calculations/Guides.cs
@@ -129,7 +129,7 @@
             var ra = Vector3.Cross(guideDirection, Vector3.up);
             var quad = new Quad3(l1 + ra, l1 - ra, intersect + ra, intersect - ra);

-            if (NetManager.instance.OverlapQuad(Quad2.XZ(quad), 0, 1280f, netInfo.m_class.m_layer, nodeId, 0, segmentId))
+            if (NetManager.instance.OverlapQuad(Quad2.XZ(quad), 0, 1280f, ItemClass.CollisionType.Undefined, netInfo.m_class.m_layer, nodeId, 0, segmentId))
             {
                 return;
             }


Update ver. no

Update ver. no

--- AnimatorController.cs
+++ AnimatorController.cs
@@ -21,7 +21,7 @@
         #region CONSTANTS

         public const string Extension = "AnimatorController";
-        public const string Version = "v0.1.0";
+        public const string Version = "v0.2.0";

         #endregion CONSTANTS


Add extra properties to experience model

--- Client/API/Students/Experiences/ExperienceModel.cs
+++ Client/API/Students/Experiences/ExperienceModel.cs
@@ -20,7 +20,10 @@
         public DateTime Start { get; set; }
         public DateTime? End { get; set; }

+        public int? TypeID { get; set; }
         public string Type { get; set; }
+
+        public int? HoursID { get; set; }
         public string Hours { get; set; }
     }
 }


Added a code to reload the vessels while in space center

--- Client/Systems/VesselProtoSys/VesselProtoSystem.cs
+++ Client/Systems/VesselProtoSys/VesselProtoSystem.cs
@@ -47,6 +47,7 @@
         {
             base.OnEnabled();
             GameEvents.onVesselWasModified.Add(VesselProtoEvents.VesselModified);
+            SetupRoutine(new RoutineDefinition(1000, RoutineExecution.Update, CheckVesselsToLoadReloadWhileNotInFlight));
             SetupRoutine(new RoutineDefinition(2000, RoutineExecution.Update, CheckVesselsToLoad));
             SetupRoutine(new RoutineDefinition(1500, RoutineExecution.Update, CheckVesselsToReload));
             SetupRoutine(new RoutineDefinition(1000, RoutineExecution.Update, UpdateBannedPartsMessage));
@@ -143,10 +144,24 @@
         }

         /// <summary>
+        /// Check vessels that must be loaded or reloaded while we are in a different scene than in flight
+        /// </summary>
+        private void CheckVesselsToLoadReloadWhileNotInFlight()
+        {
+            if (Enabled && Time.timeSinceLevelLoad > 1f && HighLogic.LoadedScene == GameScenes.SPACECENTER)
+            {
+                HighLogic.CurrentGame.flightState.protoVessels.Clear();
+                var protoVessels = VesselsProtoStore.AllPlayerVessels.Values.Where(v => v.ShouldBeLoaded).Select(v => v.ProtoVessel);
+                HighLogic.CurrentGame.flightState.protoVessels.AddRange(protoVessels);
+            }
+        }
+
+        /// <summary>
         /// Check vessels that must be loaded
         /// </summary>
         private void CheckVesselsToLoad()
         {
+
             try
             {
                 if (ProtoSystemBasicReady && !VesselCommon.ActiveVesselIsInSafetyBubble())


Fixes type comparison to use IL stack type... Should revert this at some point in release 0.2

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

--- Mosa/Runtime/CompilerFramework/IR/StoreInstruction.cs
+++ Mosa/Runtime/CompilerFramework/IR/StoreInstruction.cs
@@ -36,6 +36,18 @@
             RefSigType dref = destinationPtr.Type as RefSigType;
             PtrSigType dptr = destinationPtr.Type as PtrSigType;
             Debug.Assert((null != dref || null != dptr), @"Destination not a pointer or reference.");
+
+            /*
+             * __grover, 12/01/08
+             * Unfortunately the following checks don't work. The C# compiler doesn't emit strict IL (still safe though):
+             *
+             * ldc.i4.s 72
+             * stind.i1
+             *
+             * It doesn't insert an explicit conversion because the CIL spec specifies truncation - so we check the stack
+             * type instead.
+             *
+             *
             if (null != dref)
             {
                 Debug.Assert(true == dref.ElementType.Equals(value.Type), @"Incompatible destination and source types.");
@@ -46,6 +58,21 @@
             {
                 Debug.Assert(true == dptr.ElementType.Equals(value.Type), @"Incompatible destination and source types.");
                 if (false == dptr.ElementType.Equals(value.Type))
+                    throw new ArgumentException(@"Destination pointer incompatible with value type.", @"destinationPtr");
+            }
+             */
+            if (dref != null)
+            {
+                StackTypeCode drefType = Operand.StackTypeFromSigType(dref.ElementType);
+                Debug.Assert(value.StackType == drefType, @"Incompatible destination and source types.");
+                if (value.StackType != drefType)
+                    throw new ArgumentException(@"Destination reference incompatible with value type.", @"destinationPtr");
+            }
+            else if (dptr != null)
+            {
+                StackTypeCode dptrType = Operand.StackTypeFromSigType(dptr.ElementType);
+                Debug.Assert(value.StackType == dptrType, @"Incompatible destination and source types.");
+                if (value.StackType != dptrType)
                     throw new ArgumentException(@"Destination pointer incompatible with value type.", @"destinationPtr");
             }
             else


Cleaned up XElementExtensions.

Cleaned up XElementExtensions.

--- Code/OpenRealEstate.Services/XElementExtensions.cs
+++ Code/OpenRealEstate.Services/XElementExtensions.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Linq;
+using System.Xml;
 using System.Xml.Linq;
 using Shouldly;

@@ -8,7 +9,7 @@
     public static class XElementExtensions
     {
         public static string Value(this XElement xElement,
-            string elementName,
+            string elementName = null,
             string attributeName = null,
             string attributeValue = null)
         {
@@ -33,7 +34,7 @@
         }

         public static string ValueOrDefault(this XElement xElement,
-            string elementName,
+            string elementName = null,
             string attributeName = null,
             string attributeValue = null)
         {
@@ -42,9 +43,9 @@
                 throw new ArgumentNullException();
             }

-            elementName.ShouldNotBeNullOrEmpty();
-
-            var childElement = xElement.Element(elementName);
+            var childElement = string.IsNullOrEmpty(elementName)
+               ? xElement
+               : xElement.Element(elementName);
             if (childElement == null)
             {
                 return null;
@@ -122,8 +123,7 @@
             var attribute = xElement.Attribute(attributeName);
             if (attribute == null)
             {
-                // No attribute (for this element) found.
-                throw new ArgumentNullException();
+                return false;
             }

             // Check to see if this value can be converted to a bool. Ie. 0/1/true/false.
@@ -133,58 +133,17 @@
                 : attribute.Value.ParseYesNoToBool();
         }

-        public static int IntValueOrDefault(this XElement xElement, string childElementName = null)
+        public static int IntValueOrDefault(this XElement xElement, string elementName = null)
         {
-            if (xElement == null)
-            {
-                return 0;
-            }
-
-            // If we don't provide a child element name, then use the current one.
-            var childElement = string.IsNullOrEmpty(childElementName)
-                ? xElement
-                : xElement.Element(childElementName);
-            if (childElement == null)
-            {
-                return 0;
-            }
-
-            var value = childElement.Value;
-            if (string.IsNullOrEmpty(value))
-            {
-                return 0;
-            }
-
-            int number;
-            if (value.Contains("."))
-            {
-                int.TryParse(value.Substring(0, value.IndexOf(".", StringComparison.Ordinal)), out number);
-            }
-            else
-            {
-                int.TryParse(value, out number);
-            }
-
-            return number;
+            return (int) xElement.DecimalValueOrDefault(elementName);
         }

         public static decimal DecimalValueOrDefault(this XElement xElement, string elementName)
         {
-            if (xElement == null)
-            {
-                return 0;
-            }
-
-            var childElement = xElement.Element(elementName);
-            if (childElement == null)
-            {
-                return 0;
-            }
-
-            var value = childElement.Value;
+            var value = xElement.ValueOrDefault(elementName);
             if (string.IsNullOrEmpty(value))
             {
-                return 0;
+                return 0M;
             }

             decimal number;
@@ -193,65 +152,16 @@
             return number;
         }

-        public static byte ByteValueOrDefault(this XElement xElement, string childElementName = null)
+        public static byte ByteValueOrDefault(this XElement xElement, string elementName = null)
         {
-            if (xElement == null)
-            {
-                return 0;
-            }
-
-            // If we don't provide a child element name, then use the current one.
-            var childElement = string.IsNullOrEmpty(childElementName)
-                ? xElement
-                : xElement.Element(childElementName);
-            if (childElement == null)
-            {
-                return 0;
-            }
-
-            var value = childElement.Value;
-            if (string.IsNullOrEmpty(value))
-            {
-                return 0;
-            }
-
-            byte number;
-            if (value.Contains("."))
-            {
-                byte.TryParse(value.Substring(0, value.IndexOf(".", StringComparison.Ordinal)), out number);
-            }
-            else
-            {
-                byte.TryParse(value, out number);
-            }
-
-            return number;
+            return (byte) xElement.DecimalValueOrDefault(elementName);
         }

-        public static bool BoolValueOrDefault(this XElement xElement, string childElementName = null)
+        public static bool BoolValueOrDefault(this XElement xElement, string elementName = null)
         {
-            if (xElement == null)
+            var value = xElement.ValueOrDefault(elementName);
+            if (string.IsNullOrWhiteSpace(value))
             {
-                throw new ArgumentNullException("xElement");
-            }
-
-            // If we don't provide a child element name, then use the current one.
-            var childElement = string.IsNullOrEmpty(childElementName)
-                ? xElement
-                : xElement.Element(childElementName);
-            if (childElement == null)
-            {
-                // We've asked for a child element, but it doesn't exist.
-                // Child elements are optional - which is why we're not throwning an exception.
-                //return false;
-                throw new Exception(
-                    string.Format("The element '{0}' was not found. Please provide a valid element or Child Element.", childElementName));
-            }
-
-            var value = childElement.Value;
-            if (string.IsNullOrEmpty(value))
-            {
-                // Element exists but it has no value.
                 return false;
             }


Seems pretty obvious

Seems pretty obvious

--- src/Skybrud.Social.Microsoft/Responses/MicrosoftResponse.cs
+++ src/Skybrud.Social.Microsoft/Responses/MicrosoftResponse.cs
@@ -1,6 +1,6 @@
-using System;
-using System.Net;
+using System.Net;
 using Skybrud.Social.Http;
+using Skybrud.Social.Microsoft.Exceptions;

 namespace Skybrud.Social.Microsoft.Responses {

@@ -27,7 +27,7 @@
             if (response.StatusCode == HttpStatusCode.OK) return;

             // Now throw some exceptions
-            throw new Exception("WTF?");
+            throw new MicrosoftException(response);

         }


Anpassungen

Anpassungen

--- ConsoleApplication1/ConsoleApplication1/Program.cs
+++ ConsoleApplication1/ConsoleApplication1/Program.cs
@@ -10,7 +10,8 @@
     {
         static void Main(string[] args)
         {
-            Console.WriteLine("Hello World!");
+            string eingabe = Console.ReadLine();
+            Console.WriteLine(eingabe);
             Console.ReadKey();
         }
     }


Add backwards compatibility stuff.

Add backwards compatibility stuff.

--- game/server/base/compat.cs
+++ game/server/base/compat.cs
@@ -56,3 +56,45 @@
 {
 	textureName	= "share/shapes/rotc/effects/explosion4_white.png";
 };
+
+datablock ParticleData(TextureFileDummy3)
+{
+	textureName	= "share/textures/rotc/zone.lane.png";
+};
+
+datablock ParticleData(TextureFileDummy4)
+{
+	textureName	= "share/hud/rotc/icon.anchor.20x20.png";
+};
+
+datablock ParticleData(TextureFileDummy5)
+{
+	textureName	= "share/hud/rotc/icon.explosivedisc.20x20.png";
+};
+
+datablock ParticleData(TextureFileDummy6)
+{
+	textureName	= "share/hud/rotc/icon.grenade.20x20.png";
+};
+
+datablock ParticleData(TextureFileDummy7)
+{
+	textureName	= "share/hud/rotc/icon.repeldisc.20x20.png";
+};
+
+datablock ParticleData(TextureFileDummy8)
+{
+	textureName	= "share/hud/rotc/icon.slasherdisc.20x20.png";
+};
+
+datablock ParticleData(TextureFileDummy9)
+{
+	textureName	= "share/hud/rotc/icon.stabilizer.20x20.png";
+};
+
+datablock ParticleData(TextureFileDummy10)
+{
+	textureName	= "share/hud/rotc/icon.permaboard.20x20.png";
+};
+
+


Hide input from private dev channel.

Hide input from private dev channel.

--- Coremero/Coremero.Plugin.Playground/ImitateChat.cs
+++ Coremero/Coremero.Plugin.Playground/ImitateChat.cs
@@ -89,11 +89,11 @@
                 Parallel.ForEach(server.Channels, channel =>
                 {
                     IBufferedChannel bufferedChannel = channel as IBufferedChannel;
-                    if (bufferedChannel != null)
+                    if (bufferedChannel != null && !bufferedChannel.Name.Contains("homero-dev"))
                     {
                         try
                         {
-                            foreach (IBufferedMessage message in bufferedChannel.GetLatestMessagesAsync(10000).Result)
+                            foreach (IBufferedMessage message in bufferedChannel.GetLatestMessagesAsync(12000).Result)
                             {
                                 if (message.User.Name == botName || string.IsNullOrEmpty(message.Text.Trim()) ||
                                     message.Text.IsCommand())


Remove debug changes

Remove debug changes

--- osu.Game/Screens/Play/MasterGameplayClockContainer.cs
+++ osu.Game/Screens/Play/MasterGameplayClockContainer.cs
@@ -8,7 +8,6 @@
 using osu.Framework.Audio.Track;
 using osu.Framework.Bindables;
 using osu.Framework.Graphics;
-using osu.Framework.Logging;
 using osu.Framework.Timing;
 using osu.Game.Beatmaps;
 using osu.Game.Beatmaps.ControlPoints;
@@ -103,7 +102,7 @@
             if (IsLoaded)
             {
                 // During normal operation, the source is stopped after performing a frequency ramp.
-                this.TransformBindableTo(GameplayClock.ExternalPauseFrequencyAdjust, 0, 2000, Easing.Out).OnComplete(_ =>
+                this.TransformBindableTo(GameplayClock.ExternalPauseFrequencyAdjust, 0, 200, Easing.Out).OnComplete(_ =>
                 {
                     if (IsPaused.Value)
                         base.StopGameplayClock();
@@ -149,7 +148,7 @@

             if (IsLoaded)
             {
-                this.TransformBindableTo(GameplayClock.ExternalPauseFrequencyAdjust, 1, 2000, Easing.In);
+                this.TransformBindableTo(GameplayClock.ExternalPauseFrequencyAdjust, 1, 200, Easing.In);
             }
             else
             {
@@ -191,14 +190,6 @@

         private bool speedAdjustmentsApplied;

-        protected override void Update()
-        {
-            base.Update();
-
-            if (GameplayClock.ExternalPauseFrequencyAdjust.Value < 1)
-                Logger.Log($"{GameplayClock.CurrentTime}");
-        }
-
         private void addSourceClockAdjustments()
         {
             if (speedAdjustmentsApplied)


Deregister event when disposing.

Deregister event when disposing.

--- Eutherion/Win.MdiAppTemplate/MenuCaptionBarForm.cs
+++ Eutherion/Win.MdiAppTemplate/MenuCaptionBarForm.cs
@@ -888,5 +888,11 @@
             e.Cancel = cancel;
             base.OnFormClosing(e);
         }
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing) DockedControl.DockPropertiesChanged -= DockedControl_DockPropertiesChanged;
+            base.Dispose(disposing);
+        }
     }
 }


Test automatic versionning

Test automatic versionning

--- FDK/SoftFX.Extended.Net/Properties/AssemblyInfo.cs
+++ FDK/SoftFX.Extended.Net/Properties/AssemblyInfo.cs
@@ -39,5 +39,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("1.17.1.0")]
-[assembly: AssemblyFileVersion("1.17.1.0")]
+[assembly: AssemblyVersion("1.17.212.0")]
+[assembly: AssemblyFileVersion("1.17.212.0")]


Adding files is now a tasked operation, preventing multiple access to Glue lists.

--- FRBDK/Glue/Glue/Managers/AddExistingFileManager.cs
+++ FRBDK/Glue/Glue/Managers/AddExistingFileManager.cs
@@ -38,33 +38,32 @@
                 foreach(var file in viewModel.Files)
                 {
                     // If there is already an RFS for this file, no need to add it again.
-                    ReferencedFileSave existingFile = null;
-                    if(element != null)
+                    TaskManager.Self.AddOrRunIfTasked(() =>
                     {
-                        existingFile = element.GetAllReferencedFileSavesRecursively()
-                            .FirstOrDefault(item =>
-                                GlueCommands.Self.FileCommands.GetFullFileName(item) == file);
-                    }
-                    else
-                    {
-                        // global content?
-                        existingFile = GlueState.Self.CurrentGlueProject.GlobalFiles
-                            .FirstOrDefault(item =>
-                                GlueCommands.Self.FileCommands.GetFullFileName(item) == file);
-                    }
+                        ReferencedFileSave existingFile = null;
+                        if(element != null)
+                        {
+                            existingFile = element.GetAllReferencedFileSavesRecursively()
+                                .FirstOrDefault(item =>
+                                    GlueCommands.Self.FileCommands.GetFullFileName(item) == file);
+                        }
+                        else
+                        {
+                            // global content?
+                            existingFile = GlueState.Self.CurrentGlueProject.GlobalFiles
+                                .FirstOrDefault(item =>
+                                    GlueCommands.Self.FileCommands.GetFullFileName(item) == file);
+                        }

-                    if(existingFile == null)
-                    {
-                        TaskManager.Self.Add(() =>
+                        if (existingFile == null)
                         {
                             AddSingleFile(file, ref userCancelled, element, directoryOfTreeNode);
-
-                        }, $"Adding file {file}");
-                    }
-                    else
-                    {
-                        GlueState.Self.CurrentReferencedFileSave = existingFile;
-                    }
+                        }
+                        else
+                        {
+                            GlueCommands.Self.DoOnUiThread(() =>  GlueState.Self.CurrentReferencedFileSave = existingFile);
+                        }
+                    }, $"Adding file {file}");
                 }
             }
         }


Slightly improve the BamlGenerator resilience

--- ILRepack/Steps/ResourceProcessing/BamlGenerator.cs
+++ ILRepack/Steps/ResourceProcessing/BamlGenerator.cs
@@ -97,18 +97,29 @@
             {
                 if (document.FindIndex(IsResourceDictionaryElementStart) == -1)
                 {
+                    //TODO: throw? (Let's hope people read the logs ^_^)
                     _logger.ERROR(string.Format(
                         "Existing 'Themes/generic.xaml' in {0} is *not* a ResourceDictionary. " +
                         "This will prevent proper WPF application merging.", _mainAssemblyName));
                     return;
                 }

-                int attributeInfosStartIndex = document.FindLastIndex(r => r is AssemblyInfoRecord) + 1;
-
-                AdjustAttributeIds(document, 2);
-                document.InsertRange(attributeInfosStartIndex, GetMergedDictionariesAttributes());
+                int attributeInfosStartIndex = document.FindLastIndex(r => r is AssemblyInfoRecord);
+                if (attributeInfosStartIndex == -1)
+                {
+                    _logger.ERROR("Invalid BAML detected. (no AssemblyInfoRecord)");
+                    return;
+                }
+
+                var extraAttributes = GetMergedDictionariesAttributes().ToList();
+                AdjustAttributeIds(document, (ushort)extraAttributes.Count);
+                document.InsertRange(attributeInfosStartIndex + 1, extraAttributes);

                 int defferableRecordIndex = document.FindIndex(r => r is DeferableContentStartRecord);
+                if (attributeInfosStartIndex == -1)
+                {
+                    _logger.ERROR("Invalid BAML detected. (No DeferableContentStartRecord)");
+                }

                 document.InsertRange(defferableRecordIndex, GetDictionariesList(importedFiles));
             }
@@ -135,11 +146,12 @@

         private static void AdjustAttributeIds(BamlDocument document, ushort offset)
         {
+            const string AttributeIdPropertyName = "AttributeId";
             var existingAttributeInfoRecords = document.OfType<AttributeInfoRecord>().ToList();

             foreach (var record in document)
             {
-                ushort? attributeId = record.TryGetPropertyValue("AttributeId") as ushort?;
+                ushort? attributeId = record.TryGetPropertyValue(AttributeIdPropertyName) as ushort?;
                 if (attributeId == null ||
                     record is AttributeInfoRecord ||
                     !existingAttributeInfoRecords.Any(r => r.AttributeId == attributeId))
@@ -147,7 +159,7 @@
                     continue;
                 }

-                record.TrySetPropertyValue("AttributeId", (ushort)(attributeId.Value + offset));
+                record.TrySetPropertyValue(AttributeIdPropertyName, (ushort)(attributeId.Value + offset));
             }

             foreach (var attributeInfoRecord in existingAttributeInfoRecords)


RawValueメソッドを追加。

RawValueメソッドを追加。

--- Implem.Pleasanter/Libraries/Html/HtmlAttributes.cs
+++ Implem.Pleasanter/Libraries/Html/HtmlAttributes.cs
@@ -96,6 +96,16 @@
             return this;
         }

+        public HtmlAttributes RawValue(string value, bool _using = true)
+        {
+            if (!value.IsNullOrEmpty() && _using)
+            {
+                base.Add("value");
+                base.Add(value);
+            }
+            return this;
+        }
+
         public HtmlAttributes DataMax(decimal value, bool _using = true)
         {
             if (_using)