Updated to implement correct object conversion

--- Commands/Base/SPOnlineConnectionHelper.cs
+++ Commands/Base/SPOnlineConnectionHelper.cs
@@ -39,9 +39,7 @@
                 realm = GetRealmFromTargetUrl(url);
             }

-            var context = (PnPClientContext)authManager.GetAppOnlyAuthenticatedContext(url.ToString(), realm, clientId, clientSecret);
-            context.RetryCount = retryCount;
-            context.Delay = retryWait * 1000;
+            var context = PnPClientContext.ConvertFrom(authManager.GetAppOnlyAuthenticatedContext(url.ToString(), realm, clientId, clientSecret), retryCount, retryWait * 1000);
             context.ApplicationName = Properties.Resources.ApplicationName;
             context.RequestTimeout = requestTimeout;

@@ -71,9 +69,7 @@
             string configFile = Path.Combine(appDataFolder, "OfficeDevPnP.PowerShell\\tokencache.dat");
             FileTokenCache cache = new FileTokenCache(configFile);

-            var context = (PnPClientContext)authManager.GetAzureADNativeApplicationAuthenticatedContext(url.ToString(), clientId, redirectUri, cache);
-            context.RetryCount = retryCount;
-            context.Delay = retryWait * 1000;
+            var context = PnPClientContext.ConvertFrom(authManager.GetAzureADNativeApplicationAuthenticatedContext(url.ToString(), clientId, redirectUri, cache), retryCount, retryWait * 10000);

             var connectionType = ConnectionType.OnPrem;
             if (url.Host.ToUpperInvariant().EndsWith("SHAREPOINT.COM"))
@@ -93,9 +89,7 @@
         internal static SPOnlineConnection InitiateAzureADAppOnlyConnection(Uri url, string clientId, string tenant, string certificatePath, SecureString certificatePassword, int minimalHealthScore, int retryCount, int retryWait, int requestTimeout, bool skipAdminCheck = false)
         {
             Core.AuthenticationManager authManager = new Core.AuthenticationManager();
-            var context = (PnPClientContext)authManager.GetAzureADAppOnlyAuthenticatedContext(url.ToString(), clientId, tenant, certificatePath, certificatePassword);
-            context.RetryCount = retryCount;
-            context.Delay = retryWait * 1000;
+            var context = PnPClientContext.ConvertFrom(authManager.GetAzureADAppOnlyAuthenticatedContext(url.ToString(), clientId, tenant, certificatePath, certificatePassword), retryCount, retryWait * 1000);
             var connectionType = ConnectionType.OnPrem;
             if (url.Host.ToUpperInvariant().EndsWith("SHAREPOINT.COM"))
             {
@@ -116,7 +110,7 @@
         {
             var authManager = new Core.AuthenticationManager();

-            var context = (PnPClientContext)authManager.GetWebLoginClientContext(url.ToString());
+            var context = PnPClientContext.ConvertFrom(authManager.GetWebLoginClientContext(url.ToString()), retryCount, retryWait * 1000);

             if (context != null)
             {
@@ -224,7 +218,7 @@
                 throw new Exception("Cannot retrieve ADFS settings.");
             }

-            var context = (PnPClientContext)authManager.GetADFSUserNameMixedAuthenticatedContext(url.ToString(), networkCredentials.UserName, networkCredentials.Password, networkCredentials.Domain, adfsHost, adfsRelyingParty);
+            var context = PnPClientContext.ConvertFrom(authManager.GetADFSUserNameMixedAuthenticatedContext(url.ToString(), networkCredentials.UserName, networkCredentials.Password, networkCredentials.Domain, adfsHost, adfsRelyingParty), retryCount, retryWait * 1000);
             context.RetryCount = retryCount;
             context.Delay = retryWait * 1000;

@@ -313,7 +307,8 @@
                         adfsRelyingParty = queryParameters["wtrealm"];
                     }
                 }
-            } catch(WebException ex)
+            }
+            catch (WebException ex)
             {
                 throw new Exception("Endpoint does not use ADFS for authentication.", ex);
             }


Added better error handling and logging. Especially related to WebAPI errors.

--- ConDep.Console/Deploy/CmdDeployHandler.cs
+++ ConDep.Console/Deploy/CmdDeployHandler.cs
@@ -25,6 +25,7 @@
         {
             WebQueue webQ = null;
             var conDepSettings = new ConDepSettings();
+            bool success;

             try
             {
@@ -35,17 +36,17 @@
                 webQ = WaitInQueue(logger, conDepSettings);

                 var status = new ConDepStatus();
-                ConDepConfigurationExecutor.ExecuteFromAssembly(conDepSettings, status);
+                success = ConDepConfigurationExecutor.ExecuteFromAssembly(conDepSettings, status);

-                //if (status.HasErrors)
-                //{
-                //    throw status.
-                //}
-                //else
-                //{
-                status.EndTime = DateTime.Now;
-                status.PrintSummary();
-                //}
+                if (success)
+                {
+                    status.EndTime = DateTime.Now;
+                    status.PrintSummary();
+                }
+                else
+                {
+                    Environment.Exit(1);
+                }
             }
             finally
             {


add logger using LoggerBuilder GiftDepositroriesController

--- Controllers/GiftDepositoriesController.cs
+++ Controllers/GiftDepositoriesController.cs
@@ -11,6 +11,7 @@
 using System.Web.Http.OData;
 using System.Web.Http.OData.Routing;
 using CloudBread_Admin_Web;
+using Newtonsoft.Json;

 namespace CloudBread_Admin_Web.Controllers
 {
@@ -27,11 +28,13 @@
     public class GiftDepositoriesController : ODataController
     {
         private CBEntities db = new CBEntities();
+        CBLoggerBuilder logBuider = new CBLoggerBuilder("GiftDepositories");

         // GET: odata/GiftDepositories
         [EnableQuery]
         public IQueryable<GiftDepositories> GetGiftDepositories()
         {
+            Logging.RunLog(logBuider.build(this, CBLoggerBuilder.LevelType.INFO, CBLoggerBuilder.LoggerType.GET));
             return db.GiftDepositories;
         }

@@ -39,6 +42,7 @@
         [EnableQuery]
         public SingleResult<GiftDepositories> GetGiftDepositories([FromODataUri] string key)
         {
+            Logging.RunLog(logBuider.build(this, CBLoggerBuilder.LevelType.INFO, CBLoggerBuilder.LoggerType.GETbyIID));
             return SingleResult.Create(db.GiftDepositories.Where(giftDepositories => giftDepositories.GiftDepositoryID == key));
         }

@@ -76,6 +80,8 @@
                 }
             }

+            Logging.CBLoggers logMsg = logBuider.build(this, CBLoggerBuilder.LevelType.INFO, CBLoggerBuilder.LoggerType.PUT, JsonConvert.SerializeObject(patch));
+            Logging.RunLog(logMsg);
             return Updated(giftDepositories);
         }

@@ -105,6 +111,8 @@
                 }
             }

+            Logging.CBLoggers logMsg = logBuider.build(this, CBLoggerBuilder.LevelType.INFO, CBLoggerBuilder.LoggerType.POST, JsonConvert.SerializeObject(giftDepositories));
+            Logging.RunLog(logMsg);
             return Created(giftDepositories);
         }

@@ -143,6 +151,8 @@
                 }
             }

+            Logging.CBLoggers logMsg = logBuider.build(this, CBLoggerBuilder.LevelType.INFO, CBLoggerBuilder.LoggerType.PATCH, JsonConvert.SerializeObject(patch));
+            Logging.RunLog(logMsg);
             return Updated(giftDepositories);
         }

@@ -158,6 +168,8 @@
             db.GiftDepositories.Remove(giftDepositories);
             db.SaveChanges();

+            Logging.CBLoggers logMsg = logBuider.build(this, CBLoggerBuilder.LevelType.INFO, CBLoggerBuilder.LoggerType.PATCH, key);
+            Logging.RunLog(logMsg);
             return StatusCode(HttpStatusCode.NoContent);
         }


[CoreAnimation] Remove AddContentButton & RemoveContentButton methods from IDetailView and add event ContentsButtonClicked

--- CoreAnimation/Screens/iPad/IDetailView.cs
+++ CoreAnimation/Screens/iPad/IDetailView.cs
@@ -4,8 +4,7 @@
 {
 	public interface IDetailView
 	{
-		void AddContentsButton (UIBarButtonItem button);
-		void RemoveContentsButton ();
+		event EventHandler ContentsButtonClicked;
 	}
 }


Fix tests.

Fix tests.

--- DaNES.Emulation.Tests/CpuTests/NesTest.cs
+++ DaNES.Emulation.Tests/CpuTests/NesTest.cs
@@ -112,7 +112,7 @@
 				Ppu = new Ppu(PpuRam, Screen);
 				Ram = new MemoryMap(Ppu);
 				Cpu = new LoggingCpu(Ram, programCounter: 0xC000, stackPointer: InitialStackPointer);
-				CpuCycleDuration = TimeSpan.Zero;
+				CpuCycleDurationMilliseconds = 0f;
 			}
 		}


btnForm01Simple

--- Demos/CSharpGL.Demos/FormMain.Designer.cs
+++ Demos/CSharpGL.Demos/FormMain.Designer.cs
@@ -48,10 +48,10 @@
             //
             this.btnForm01Simple.Font = new System.Drawing.Font("宋体", 12F);
             this.btnForm01Simple.Location = new System.Drawing.Point(12, 55);
-            this.btnForm01Simple.Name = "btnForm02BigDipper";
+            this.btnForm01Simple.Name = "btnForm01Simple";
             this.btnForm01Simple.Size = new System.Drawing.Size(269, 37);
             this.btnForm01Simple.TabIndex = 0;
-            this.btnForm01Simple.Text = "Form02 BigDipper";
+            this.btnForm01Simple.Text = "Form01 Simple";
             this.btnForm01Simple.UseVisualStyleBackColor = true;
             this.btnForm01Simple.Click += new System.EventHandler(this.btnForm01Simple_Click);
             //
@@ -59,7 +59,7 @@
             //
             this.btnForm02EmitNormalLine.Font = new System.Drawing.Font("宋体", 12F);
             this.btnForm02EmitNormalLine.Location = new System.Drawing.Point(12, 98);
-            this.btnForm02EmitNormalLine.Name = "btnEmitNormalLine";
+            this.btnForm02EmitNormalLine.Name = "btnForm02EmitNormalLine";
             this.btnForm02EmitNormalLine.Size = new System.Drawing.Size(269, 37);
             this.btnForm02EmitNormalLine.TabIndex = 0;
             this.btnForm02EmitNormalLine.Text = "Form02 EmitNormalLine";


Added additional unit test for relative path decompressing

--- DeveMultiCompressorTests/FullFlowTests.cs
+++ DeveMultiCompressorTests/FullFlowTests.cs
@@ -224,6 +224,96 @@
         }

         [TestMethod]
+        public void CompressAndDecompressWithoutPrecompWithAllRelativePaths()
+        {
+            Constants.CompressorFolder = "TestCompressors";
+
+            var previousDirectory = Directory.GetCurrentDirectory();
+            try
+            {
+                var curDir = Path.Combine(FolderHelperMethods.AssemblyDirectory.Value, "TestFiles");
+                Directory.SetCurrentDirectory(curDir);
+
+                var inputFile = "enwik6.txt";
+                var outputFileLzma2 = Path.Combine(FolderHelperMethods.AssemblyDirectory.Value, Constants.OutputDir, "enwik6_LZMA2.7z");
+                var outputFileLzma = Path.Combine(FolderHelperMethods.AssemblyDirectory.Value, Constants.OutputDir, "enwik6_LZMA.7z");
+
+                var inputFileInfo = new CompressorFileInfo(inputFile);
+                var inputFileHash = inputFileInfo.GenerateHash();
+
+                using (var container = DryContainer.CreateDryContainer())
+                {
+                    var runner = container.Resolve<CompressorRunner>();
+
+                    if (File.Exists(outputFileLzma2))
+                    {
+                        File.Delete(outputFileLzma2);
+                    }
+                    if (File.Exists(outputFileLzma))
+                    {
+                        File.Delete(outputFileLzma);
+                    }
+
+                    var commandLineOptions = new CommandLineOptions()
+                    {
+                        InputFile = inputFile,
+                        UsePrecomp = false,
+                        Verify = true
+                    };
+
+                    runner.GoCompress(commandLineOptions);
+
+                    Assert.IsTrue(File.Exists(outputFileLzma2));
+                    Assert.IsTrue(File.Exists(outputFileLzma));
+
+                    var lzma2 = new CompressorFileInfo(outputFileLzma2);
+                    var lzma = new CompressorFileInfo(outputFileLzma);
+
+                    var outputDirDecompressionLzma2 = Path.Combine(FolderHelperMethods.AssemblyDirectory.Value, Constants.OutputDir, "enwik6_LZMA2");
+                    var outputDirDecompressionLzma = Path.Combine(FolderHelperMethods.AssemblyDirectory.Value, Constants.OutputDir, "enwik6_LZMA");
+
+                    FolderHelperMethods.ClearDirectory(outputDirDecompressionLzma2);
+                    FolderHelperMethods.ClearDirectory(outputDirDecompressionLzma);
+
+                    Directory.SetCurrentDirectory(Path.GetDirectoryName(lzma2.FullPath));
+                    var commandLineOptionsDecompressLzma2 = new CommandLineOptions()
+                    {
+                        InputFile = Path.GetFileName(lzma2.FullPath),
+                        Decompress = true,
+                        UsePrecomp = false
+                    };
+                    runner.GoDecompress(commandLineOptionsDecompressLzma2);
+
+                    Directory.SetCurrentDirectory(Path.GetDirectoryName(lzma.FullPath));
+                    var commandLineOptionsDecompressLzma = new CommandLineOptions()
+                    {
+                        InputFile = Path.GetFileName(lzma.FullPath),
+                        Decompress = true,
+                        UsePrecomp = false
+                    };
+
+                    runner.GoDecompress(commandLineOptionsDecompressLzma);
+
+                    var expectedFileLzma2 = Path.Combine(outputDirDecompressionLzma2, "enwik6.txt");
+                    var expectedFileLzma = Path.Combine(outputDirDecompressionLzma, "enwik6.txt");
+
+                    Assert.IsTrue(File.Exists(expectedFileLzma2));
+                    Assert.IsTrue(File.Exists(expectedFileLzma));
+
+                    var compFileInfoLzma2 = new CompressorFileInfo(expectedFileLzma2);
+                    var compFileInfoLzma = new CompressorFileInfo(expectedFileLzma);
+
+                    Assert.AreEqual(inputFileHash, compFileInfoLzma2.GenerateHash());
+                    Assert.AreEqual(inputFileHash, compFileInfoLzma.GenerateHash());
+                }
+            }
+            finally
+            {
+                Directory.SetCurrentDirectory(previousDirectory);
+            }
+        }
+
+        [TestMethod]
         public void CompressAndDecompressWithPrecomp()
         {
             Constants.CompressorFolder = "TestCompressors";


tables bold

tables bold

--- EADatabaseTransformer/DBCompareControl.cs
+++ EADatabaseTransformer/DBCompareControl.cs
@@ -70,6 +70,8 @@
 					item.Font = new Font(item.Font, FontStyle.Italic); //overridden items get italic font
 					break;
 			}
+			//table should be bold
+			if (comparedItem.itemType == "Table") item.Font = new Font(item.Font,FontStyle.Bold);
 		}
 		private ListViewItem addListViewItem(DB.Compare.DatabaseItemComparison comparison,string tableName)
 		{


Fix - WIP

Fix - WIP

--- WebCrawlProcess/run.csx
+++ WebCrawlProcess/run.csx
@@ -22,16 +22,17 @@
 		return;
 	}

-	//var azureLogger = new AzureLogger(log);
+	var azureLogger = new AzureLogger(log);

-    //var crawler = new Crawler(crawlRequest, azureLogger);
-    //crawler.AddUrl($"{crawlRequest.Host}/sitemap.xml");
-    //var crawlResult = crawler.Crawl();
+    var crawler = new Crawler(crawlRequest, azureLogger);
+    crawler.AddUrl($"{crawlRequest.Host}/sitemap.xml");
+    var crawlResult = crawler.Crawl();

+
+    outputDocument = crawlResult;
+	//outputDocument = new { id = Guid.NewGuid().ToString() };
+
     log.Info($"Finished");
-
-    //outputDocument = crawlResult;
-	outputDocument = new { id = Guid.NewGuid().ToString() };
 }

 public class AzureLogger : ILogger


Display room name on discord rich presence.

--- osu.Desktop/DiscordRichPresence.cs
+++ osu.Desktop/DiscordRichPresence.cs
@@ -135,6 +135,9 @@

                 case UserActivity.Editing edit:
                     return edit.Beatmap.ToString();
+
+                case UserActivity.InLobby lobby:
+                    return lobby.Room.Name.ToString();
             }

             return string.Empty;


Better code for flip cases.

Better code for flip cases.

--- osu.Framework/Graphics/Drawable.cs
+++ osu.Framework/Graphics/Drawable.cs
@@ -309,20 +309,19 @@
             get
             {
                 Anchor origin = this.origin;
+
                 if (flipHorizontal)
                 {
-                    if ((origin & Anchor.x0) == 0)
-                        origin = (origin & ~Anchor.x0) | Anchor.x2;
-                    else if ((origin & Anchor.x2) > 0)
-                        origin = (origin & ~Anchor.x2) | Anchor.x0;
+                    Debug.Assert((origin & Anchor.x1) == 0, @"Can't flip with a centre origin set");
+                    origin ^= Anchor.x2;
                 }
+
                 if (flipVertical)
                 {
-                    if ((origin & Anchor.y0) == 0)
-                        origin = (origin & ~Anchor.y0) | Anchor.y2;
-                    else if ((origin & Anchor.y2) > 0)
-                        origin = (origin & ~Anchor.y2) | Anchor.y0;
+                    Debug.Assert((origin & Anchor.y1) == 0, @"Can't flip with a centre origin set");
+                    origin ^= Anchor.y2;
                 }
+
                 return origin;
             }
             set


Fix incorrect online conditional check in social browser logic

--- osu.Game/Overlays/SocialOverlay.cs
+++ osu.Game/Overlays/SocialOverlay.cs
@@ -155,7 +155,7 @@
             loading.Hide();
             getUsersRequest?.Cancel();

-            if (api?.IsLoggedIn == false)
+            if (api?.IsLoggedIn != true)
                 return;

             switch (Header.Tabs.Current.Value)


Add support for previewing tracks on spectator screen

--- osu.Game/Screens/Play/Spectator.cs
+++ osu.Game/Screens/Play/Spectator.cs
@@ -13,6 +13,7 @@
 using osu.Framework.Graphics.Shapes;
 using osu.Framework.Graphics.Sprites;
 using osu.Framework.Screens;
+using osu.Game.Audio;
 using osu.Game.Beatmaps;
 using osu.Game.Configuration;
 using osu.Game.Graphics;
@@ -35,7 +36,8 @@

 namespace osu.Game.Screens.Play
 {
-    public class Spectator : OsuScreen
+    [Cached(typeof(IPreviewTrackOwner))]
+    public class Spectator : OsuScreen, IPreviewTrackOwner
     {
         private readonly User targetUser;

@@ -61,6 +63,9 @@

         [Resolved]
         private RulesetStore rulesets { get; set; }
+
+        [Resolved]
+        private PreviewTrackManager previewTrackManager { get; set; }

         private Score score;

@@ -275,6 +280,7 @@
         {
             watchButton.Enabled.Value = false;
             beatmapPanelContainer.Clear();
+            previewTrackManager.StopAnyPlaying(this);
         }

         private void attemptStart()
@@ -326,7 +332,6 @@
         {
             if (state?.BeatmapID == null)
             {
-                beatmapPanelContainer.Clear();
                 onlineBeatmap = null;
                 return;
             }
@@ -359,6 +364,12 @@
             beatmaps.Download(onlineBeatmap);
         }

+        public override bool OnExiting(IScreen next)
+        {
+            previewTrackManager.StopAnyPlaying(this);
+            return base.OnExiting(next);
+        }
+
         protected override void Dispose(bool isDisposing)
         {
             base.Dispose(isDisposing);


fixed synthesis handling

fixed synthesis handling

--- EDEngineer/Utils/JournalEntryConverter.cs
+++ EDEngineer/Utils/JournalEntryConverter.cs
@@ -296,19 +296,19 @@
                         return new MaterialOperation()
                         {
                             MaterialName = synthesisIngredientName,
-                            Size = material.Value != null ? (int) material.Value : 1
+                            Size = -1 * material.Value?.ToObject<int>() ?? -1
                         };
                     case Kind.Data:
                         return new DataOperation()
                         {
                             DataName = synthesisIngredientName,
-                            Size = material.Value != null ? (int)material.Value : 1
+                            Size = -1 * material.Value?.ToObject<int>() ?? -1
                         };
                     case Kind.Commodity:
                         return new CargoOperation()
                         {
                             CommodityName = synthesisIngredientName,
-                            Size = material.Value != null ? (int)material.Value : 1
+                            Size = -1 * material.Value?.ToObject<int>() ?? -1
                         };
                     default:
                         throw new ArgumentOutOfRangeException();


Protect against missing Rank / Progress

Protect against missing Rank / Progress

--- EliteDangerous/HistoryList/HistoryList.cs
+++ EliteDangerous/HistoryList/HistoryList.cs
@@ -940,8 +940,8 @@
                     cash = (lastloadgamehe != null) ? ((JournalLoadGame)lastloadgamehe.journalEntry).Credits : 0;
                 }

-                JournalProgress progress = historylist.FindLast(x => x.EntryType == JournalTypeEnum.Progress).journalEntry as JournalProgress;
-                JournalRank rank = historylist.FindLast(x => x.EntryType == JournalTypeEnum.Rank).journalEntry as JournalRank;
+                JournalProgress progress = historylist.FindLast(x => x.EntryType == JournalTypeEnum.Progress)?.journalEntry as JournalProgress;
+                JournalRank rank = historylist.FindLast(x => x.EntryType == JournalTypeEnum.Rank)?.journalEntry as JournalRank;

                 if (async)
                 {


add DSS_PatchRadius to ModuleAttribute enum

--- EliteJournalReader/JournalDescriptions.cs
+++ EliteJournalReader/JournalDescriptions.cs
@@ -491,7 +491,8 @@
         FalloffRange,
         DSS_RangeMult,
         DSS_AngleMult,
-        DSS_RateMult
+        DSS_RateMult,
+        DSS_PatchRadius
     }

     public enum ReputationStatus


Max enum integers explicit

Max enum integers explicit

--- Fitbit.Portable/Models/DateRangePeriod.cs
+++ Fitbit.Portable/Models/DateRangePeriod.cs
@@ -11,26 +11,26 @@
         //1d, 7d, 30d, 1w, 1m, 3m, 6m, 1y, max

         [StringValue("1d")]
-        OneDay,
+        OneDay = 0,
         [StringValue("7d")]
-        SevenDays,
+        SevenDays = 1,
         [StringValue("30d")]
-        ThirtyDays,
+        ThirtyDays = 2,
         [StringValue("1w")]
-        OneWeek,
+        OneWeek = 3,
         [StringValue("1m")]
-        OneMonth,
+        OneMonth = 4,
         [Obsolete("No longer supported by Fitbit. See https://github.com/aarondcoleman/Fitbit.NET/issues/283")]
         [StringValue("3m")]
-        ThreeMonths,
+        ThreeMonths = 5,
         [Obsolete("No longer supported by Fitbit. See https://github.com/aarondcoleman/Fitbit.NET/issues/283")]
         [StringValue("6m")]
-        SixMonths,
+        SixMonths = 6,
         [Obsolete("No longer supported by Fitbit. See https://github.com/aarondcoleman/Fitbit.NET/issues/283")]
         [StringValue("1y")]
-        OneYear,
+        OneYear = 7,
         [Obsolete("No longer supported by Fitbit. See https://github.com/aarondcoleman/Fitbit.NET/issues/283")]
         [StringValue("max")]
-        Max
+        Max = 8
     }
 }


Add benchmark for DataTable.

Add benchmark for DataTable.

--- FlatFiles.Benchmark/CoreBenchmarkSuite.cs
+++ FlatFiles.Benchmark/CoreBenchmarkSuite.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Data;
 using System.IO;
 using System.Linq;
 using System.Threading.Tasks;
@@ -40,20 +41,7 @@
         public void RunFlatFiles_FlatFileDataReader_ByPosition()
         {
             var reader = new StringReader(data);
-            var schema = new SeparatedValueSchema();
-            schema.AddColumn(new StringColumn("FirstName"));
-            schema.AddColumn(new StringColumn("LastName"));
-            schema.AddColumn(new Int32Column("Age"));
-            schema.AddColumn(new StringColumn("Street1"));
-            schema.AddColumn(new StringColumn("Street2"));
-            schema.AddColumn(new StringColumn("City"));
-            schema.AddColumn(new StringColumn("State"));
-            schema.AddColumn(new StringColumn("Zip"));
-            schema.AddColumn(new StringColumn("FavoriteColor"));
-            schema.AddColumn(new StringColumn("FavoriteFood"));
-            schema.AddColumn(new StringColumn("FavoriteSport"));
-            schema.AddColumn(new DateTimeColumn("CreatedOn"));
-            schema.AddColumn(new BooleanColumn("IsActive"));
+            var schema = GetSchema();
             var csvReader = new SeparatedValueReader(reader, schema, new SeparatedValueOptions() { IsFirstRecordSchema = true });
             var dataReader = new FlatFileDataReader(csvReader);
             var people = new List<Person>();
@@ -83,20 +71,7 @@
         public void RunFlatFiles_FlatFileDataReader_ByName()
         {
             var reader = new StringReader(data);
-            var schema = new SeparatedValueSchema();
-            schema.AddColumn(new StringColumn("FirstName"));
-            schema.AddColumn(new StringColumn("LastName"));
-            schema.AddColumn(new Int32Column("Age"));
-            schema.AddColumn(new StringColumn("Street1"));
-            schema.AddColumn(new StringColumn("Street2"));
-            schema.AddColumn(new StringColumn("City"));
-            schema.AddColumn(new StringColumn("State"));
-            schema.AddColumn(new StringColumn("Zip"));
-            schema.AddColumn(new StringColumn("FavoriteColor"));
-            schema.AddColumn(new StringColumn("FavoriteFood"));
-            schema.AddColumn(new StringColumn("FavoriteSport"));
-            schema.AddColumn(new DateTimeColumn("CreatedOn"));
-            schema.AddColumn(new BooleanColumn("IsActive"));
+            var schema = GetSchema();
             var csvReader = new SeparatedValueReader(reader, schema, new SeparatedValueOptions() { IsFirstRecordSchema = true });
             var dataReader = new FlatFileDataReader(csvReader);
             var people = new List<Person>();
@@ -126,20 +101,7 @@
         public void RunFlatFiles_FlatFileDataReader_GetValue()
         {
             var reader = new StringReader(data);
-            var schema = new SeparatedValueSchema();
-            schema.AddColumn(new StringColumn("FirstName"));
-            schema.AddColumn(new StringColumn("LastName"));
-            schema.AddColumn(new StringColumn("Age"));
-            schema.AddColumn(new StringColumn("Street1"));
-            schema.AddColumn(new StringColumn("Street2"));
-            schema.AddColumn(new StringColumn("City"));
-            schema.AddColumn(new StringColumn("State"));
-            schema.AddColumn(new StringColumn("Zip"));
-            schema.AddColumn(new StringColumn("FavoriteColor"));
-            schema.AddColumn(new StringColumn("FavoriteFood"));
-            schema.AddColumn(new StringColumn("FavoriteSport"));
-            schema.AddColumn(new StringColumn("CreatedOn"));
-            schema.AddColumn(new StringColumn("IsActive"));
+            var schema = GetSchema();
             var csvReader = new SeparatedValueReader(reader, schema, new SeparatedValueOptions() { IsFirstRecordSchema = true });
             var dataReader = new FlatFileDataReader(csvReader);
             var people = new List<Person>();
@@ -166,6 +128,35 @@
         }

         [Benchmark]
+        public void RunFlatFiles_DataTable()
+        {
+            var reader = new StringReader(data);
+            var schema = GetSchema();
+            var csvReader = new SeparatedValueReader(reader, schema, new SeparatedValueOptions() { IsFirstRecordSchema = true });
+            var dataTable = new DataTable();
+            dataTable.ReadFlatFile(csvReader);
+        }
+
+        private static SeparatedValueSchema GetSchema()
+        {
+            var schema = new SeparatedValueSchema();
+            schema.AddColumn(new StringColumn("FirstName"));
+            schema.AddColumn(new StringColumn("LastName"));
+            schema.AddColumn(new Int32Column("Age"));
+            schema.AddColumn(new StringColumn("Street1"));
+            schema.AddColumn(new StringColumn("Street2"));
+            schema.AddColumn(new StringColumn("City"));
+            schema.AddColumn(new StringColumn("State"));
+            schema.AddColumn(new StringColumn("Zip"));
+            schema.AddColumn(new StringColumn("FavoriteColor"));
+            schema.AddColumn(new StringColumn("FavoriteFood"));
+            schema.AddColumn(new StringColumn("FavoriteSport"));
+            schema.AddColumn(new DateTimeColumn("CreatedOn"));
+            schema.AddColumn(new BooleanColumn("IsActive"));
+            return schema;
+        }
+
+        [Benchmark]
         public void RunFlatFiles_TypeMapper()
         {
             var mapper = SeparatedValueTypeMapper.Define(() => new Person());


HttpEndpoint sample : Use in memory instead file storage.

--- Framework/Snippets/HttpEndpoint/_Usage.cs
+++ Framework/Snippets/HttpEndpoint/_Usage.cs
@@ -11,9 +11,7 @@
 using System.Linq;
 using Lokad.Cqrs;
 using Lokad.Cqrs.Build.Engine;
-using Lokad.Cqrs.Core;
 using Lokad.Cqrs.Core.Envelope;
-using Lokad.Cqrs.Core.Outbox;
 using Lokad.Cqrs.Feature.AtomicStorage;
 using Lokad.Cqrs.Feature.Http;
 using Lokad.Cqrs.Feature.Http.Handlers;
@@ -50,7 +48,7 @@
             var messages = new[] { typeof(MouseMoved), typeof(MouseClick) };
             var serializer = new MyJsonSerializer(messages);
             var streamer = new EnvelopeStreamer(serializer);
-            var store = FileStorage.CreateConfig(GetType().Name, reset : true);
+            var store = new MemoryAccount();
             var atomic = store.CreateNuclear().Factory;

             // let's configure our custom Http server to


FrameworkElement - Actual size value entry - Cache

--- Granular.Presentation/FrameworkElement.cs
+++ Granular.Presentation/FrameworkElement.cs
@@ -104,18 +104,20 @@

         private static readonly DependencyPropertyKey ActualWidthPropertyKey = DependencyProperty.RegisterReadOnly("ActualWidth", typeof(double), typeof(FrameworkElement), new FrameworkPropertyMetadata());
         public static readonly DependencyProperty ActualWidthProperty = ActualWidthPropertyKey.DependencyProperty;
+        private IDependencyPropertyValueEntry actualWidthValueEntry;
         public double ActualWidth
         {
             get { return (double)GetValue(ActualWidthPropertyKey); }
-            private set { SetValue(ActualWidthPropertyKey, value); }
+            private set { actualWidthValueEntry.SetBaseValue((int)BaseValueSource.Local, value); }
         }

         private static readonly DependencyPropertyKey ActualHeightPropertyKey = DependencyProperty.RegisterReadOnly("ActualHeight", typeof(double), typeof(FrameworkElement), new FrameworkPropertyMetadata());
         public static readonly DependencyProperty ActualHeightProperty = ActualHeightPropertyKey.DependencyProperty;
+        private IDependencyPropertyValueEntry actualHeightValueEntry;
         public double ActualHeight
         {
             get { return (double)GetValue(ActualHeightPropertyKey); }
-            private set { SetValue(ActualHeightPropertyKey, value); }
+            private set { actualHeightValueEntry.SetBaseValue((int)BaseValueSource.Local, value); }
         }

         public Size ActualSize { get; private set; }
@@ -260,6 +262,9 @@
             Triggers.CollectionChanged += OnTriggersCollectionChanged;

             resourcesCache = new CacheDictionary<object, object>(TryResolveResource);
+
+            actualWidthValueEntry = GetValueEntry(ActualWidthPropertyKey);
+            actualHeightValueEntry = GetValueEntry(ActualHeightPropertyKey);

             ActualSize = Size.Empty;
             Size = Size.Empty;


Comment out the call to turn on logging and add additional instrucitons on how to do it. (#144)

--- examples/Program.cs
+++ examples/Program.cs
@@ -14,6 +14,7 @@

 using Google.Ads.GoogleAds.Lib;
 using Google.Ads.GoogleAds.Util;
+
 using System;
 using System.Collections.Generic;
 using System.IO;
@@ -33,9 +34,11 @@
         /// <param name="args">The command line arguments.</param>
         public static void Main(string[] args)
         {
-            // Turn on logging. This is useful for debugging your requests.
-            TraceUtilities.Configure(TraceUtilities.DETAILED_REQUEST_LOGS_SOURCE,
-                "C:\\logs\\details.log", System.Diagnostics.SourceLevels.All);
+            // Turn on detailed logging. This is useful for debugging your requests.
+            // You should also replace INSERT_PATH_TO_DETAILED_LOGS_HERE to a file path that will
+            // be used to write the detailed logs to. E.g. C:\\logs\\details.log
+            // TraceUtilities.Configure(TraceUtilities.DETAILED_REQUEST_LOGS_SOURCE,
+            //    "INSERT_PATH_TO_DETAILED_LOGS_HERE", System.Diagnostics.SourceLevels.All);

             // If the API log doesn't give you enough details, then you can enable more low level
             // logging at grpc level. Keep in mind that this can get pretty detailed and long. The


Replaced obsolete code in the example for SDL.

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

--- examples/SDL/SDL.cs
+++ examples/SDL/SDL.cs
@@ -10,8 +10,8 @@
         public void Setup(Driver driver)
         {
             var options = driver.Options;
-            options.LibraryName = "SDL";
-            options.Headers.Add("SDL.h");
+            var module = options.AddModule("SDL");
+            module.Headers.Add("SDL.h");
             options.OutputDir = "SDL";

             var parserOptions = driver.ParserOptions;


added reminder;

added reminder;

--- examples/TCP/TCP.cs
+++ examples/TCP/TCP.cs
@@ -431,6 +431,7 @@
     }

     // FIXME should have memory pre-allocated for packet generation.
+    // FIXME set other info such as window size.
     private Packet raw_packet(ushort src_port, ushort dst_port, IPAddress dst_ip) {
       var tcp_p = new TcpPacket(src_port, dst_port);
       var ip_p = new IPv4Packet(ip_address, dst_ip);


取消了RemotingClient.GetRemotingObj方法对泛型的MarshalByRefObject类型限制，因此现在可以在客户端只引用接口而不必暴露服务端的业务逻辑

--- HttpLib/Remoting/Client/RemotingClient.cs
+++ HttpLib/Remoting/Client/RemotingClient.cs
@@ -35,7 +35,7 @@
         /// <param name="prefixUri">服务端地址，例如“tcp://localhost:6666/”</param>
         /// <param name="objectUri">类型地址，例如“RemotingObject”</param>
         /// <returns>服务器对象的代理</returns>
-        public static T GetRemotingObj<T>( string prefixUri, string objectUri = null ) where T : MarshalByRefObject
+        public static T GetRemotingObj<T>( string prefixUri, string objectUri = null )
         {
             if (!ChannelRegistered) RegisterChannel();
             Type t = typeof(T);
@@ -43,7 +43,7 @@
             string url = (prefixUri.StartsWith("tcp://") ? "" : "tcp://") + prefixUri + (prefixUri.EndsWith("/") ? "" : "/") + objectUri;
             try
             {
-                return Activator.GetObject(t, url) as T;
+                return (T)Activator.GetObject(t, url);
             }
             catch
             {


Fixes error in the profiler when pointer is null

--- ink-engine-runtime/Profiler.cs
+++ ink-engine-runtime/Profiler.cs
@@ -70,18 +70,20 @@

 			var stack = new string[callstack.elements.Count];
 			for(int i=0; i<stack.Length; i++) {
-				var objPath = callstack.elements[i].currentPointer.path;
-				string stackElementName = "";
-
-				for(int c=0; c<objPath.length; c++) {
-					var comp = objPath.GetComponent(c);
-					if( !comp.isIndex ) {
-						stackElementName = comp.name;
-						break;
-					}
-				}
-
-				stack[i] = stackElementName;
+                string stackElementName = "";
+                if(!callstack.elements[i].currentPointer.isNull) {
+                    var objPath = callstack.elements[i].currentPointer.path;
+
+                    for(int c=0; c<objPath.length; c++) {
+                        var comp = objPath.GetComponent(c);
+                        if( !comp.isIndex ) {
+                            stackElementName = comp.name;
+                            break;
+                        }
+                    }
+
+                }
+                stack[i] = stackElementName;
 			}

 			_currStepStack = stack;


Added Webmention meta tags

Added Webmention meta tags

--- input/_layouts/metadata.cshtml
+++ input/_layouts/metadata.cshtml
@@ -32,6 +32,8 @@

 	<link rel="alternate" href="https://leekelleher.com/feed/" type="application/rss+xml">
 	<link rel="canonical" href="@url">
+	<link rel="pingback" href="https://webmention.io/leekelleher.com/xmlrpc">
+	<link rel="webmention" href="https://webmention.io/leekelleher.com/webmention">
 @if(internalCss != null)
 {
 	<style type="text/css">


Fixed pagination

Fixed pagination

--- IEEETalks.Host.API/Models/PagedRequest.cs
+++ IEEETalks.Host.API/Models/PagedRequest.cs
@@ -5,6 +5,6 @@
         public virtual int PageSize => 20;
         public int CurrentPage { get; set; }

-        public bool HasMore(int totalRecords) => PageSize*CurrentPage < totalRecords;
+        public bool HasMore(int totalRecords) => PageSize*(CurrentPage + 1) < totalRecords;
     }
 }


Send single sample of processor performance counter to the InfluxDB.Net.

Also confirmed that the values can be read using grafana.

--- InfluxDB.Net.Collector.Console/Program.cs
+++ InfluxDB.Net.Collector.Console/Program.cs
@@ -1,4 +1,6 @@
 using System;
+using System.Diagnostics;
+using InfluxDB.Net.Models;

 namespace InfluxDB.Net.Collector.Console
 {
@@ -28,8 +30,33 @@
             var version = _client.VersionAsync().Result;
             System.Console.WriteLine("Version: {0}", version);

-            System.Console.WriteLine("Press any key to exit...");
+            var processorCounter = GetPerformanceCounter();
+            System.Threading.Thread.Sleep(100);
+
+            var result = RegisterCounterValue(processorCounter);
+            System.Console.WriteLine(result.StatusCode);
+
+            System.Console.WriteLine("Press enter to exit...");
             System.Console.ReadKey();
+        }
+
+        private static InfluxDbApiResponse RegisterCounterValue(PerformanceCounter processorCounter)
+        {
+            var data = processorCounter.NextValue();
+            System.Console.WriteLine("Processor value: {0}%", data);
+            var serie = new Serie.Builder("Processor")
+                .Columns("Total")
+                .Values(data)
+                .Build();
+            var result = _client.WriteAsync("QTest", TimeUnit.Milliseconds, serie);
+            return result.Result;
+        }
+
+        private static PerformanceCounter GetPerformanceCounter()
+        {
+            var processorCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
+            processorCounter.NextValue();
+            return processorCounter;
         }
     }
 }


Add failing regression test

Add failing regression test

The test demonstrates that setup argument expressions using indexers
are apparently evaluated lazily (the `ArgumentOutOfRangeException` is
evidence that the iteration variable is being captured), which doesn't
make much sense since regular property accesses are evaluated eagerly.
They're probably more like properties than like regular methods.

--- tests/Moq.Tests/Regressions/IssueReportsFixture.cs
+++ tests/Moq.Tests/Regressions/IssueReportsFixture.cs
@@ -2371,6 +2371,31 @@

 		#endregion

+		#region 714
+
+		public class Issue714
+		{
+			[Fact]
+			public void Setup_argument_using_indexer_should_be_evaluated_eagerly()
+			{
+				Mock<IMockable> mock = new Mock<IMockable>();
+				var args = new List<object> { new object() };
+				for (var i = 0; i < args.Count; i++)
+				{
+					mock.Setup(m => m.Method(args[i]));
+				}
+
+				mock.Object.Method(args[0]);
+			}
+
+			public interface IMockable
+			{
+				void Method(object arg);
+			}
+		}
+
+		#endregion
+
 		#region 725

 		public sealed class Issue725


Updated DittoFactory unit-test to use renamed mock types.

--- tests/Our.Umbraco.Ditto.Tests/DittoFactoryTests.cs
+++ tests/Our.Umbraco.Ditto.Tests/DittoFactoryTests.cs
@@ -7,6 +7,7 @@
 namespace Our.Umbraco.Ditto.Tests
 {
     [TestFixture]
+    [Category("Processors")]
     public class DittoFactoryTests
     {
         public interface IMyModel
@@ -43,31 +44,16 @@
         [Test]
         public void Factory_Resolves()
         {
-            var content1 = new PublishedContentMock
+            var content1 = new MockPublishedContent { Name = "Content 1", DocumentTypeAlias = "MyModel1" };
+            var content2 = new MockPublishedContent { Name = "Content 2", DocumentTypeAlias = "MyModel2" };
+            var content3 = new MockPublishedContent { Name = "Content 3", DocumentTypeAlias = "MyModel3" };
+
+            var content = new MockPublishedContent
             {
-                Name = "Content 1",
-                DocumentTypeAlias = "MyModel1"
-            };
-
-            var content2 = new PublishedContentMock
-            {
-                Name = "Content 2",
-                DocumentTypeAlias = "MyModel2"
-            };
-
-            var content3 = new PublishedContentMock
-            {
-                Name = "Content 3",
-                DocumentTypeAlias = "MyModel3"
-            };
-
-
-            var content = new PublishedContentMock
-            {
-                Properties = new List<IPublishedContentProperty>
+                Properties = new List<IPublishedProperty>
                 {
-                    new PublishedContentPropertyMock("MyCollection", new [] { content1, content2, content3  }, true),
-                    new PublishedContentPropertyMock("MyProperty", content3, true)
+                    new MockPublishedContentProperty("MyCollection", new [] { content1, content2, content3  }),
+                    new MockPublishedContentProperty("MyProperty", content3)
                 }
             };


remove assertions that doesn't agree with Mono's ordering impl of Hashtable

--- tests/ServiceStack.Text.Tests/SpecialTypesTests.cs
+++ tests/ServiceStack.Text.Tests/SpecialTypesTests.cs
@@ -58,9 +58,6 @@
 	    public void Can_Serialize_HashTable()
 	    {
             var h = new Hashtable { { "A", 1 }, { "B", 2 } };
-            Assert.That(h.ToJson(), Is.EqualTo("{\"A\":1,\"B\":2}"));
-            Assert.That(JsonSerializer.SerializeToString(h, typeof(Hashtable)), Is.EqualTo("{\"A\":1,\"B\":2}"));
-
 	        var fromJson = h.ToJson().FromJson<Hashtable>();
             Assert.That(fromJson.Count, Is.EqualTo(h.Count));
             Assert.That(fromJson["A"].ToString(), Is.EqualTo(h["A"].ToString()));


bug fix

bug fix

--- cscs/Main.cs
+++ cscs/Main.cs
@@ -35,10 +35,10 @@
             // Subscribe to the printing events from the interpreter.
             // A printing event will be triggered after each successful statement
             // execution. On error an exception will be thrown.
-            Interpreter.Instance.GetOutput += Print;
+            Interpreter.Instance.OnOutput += Print;

             string scriptFilename = "scripts/temp.cscs";
-            //scriptFilename = "";
+            scriptFilename = "";
             string script = Utils.GetFileContents(scriptFilename);

             DebuggerServer.BaseDirectory = "";


Updated AssemblyInfo.cs

Updated AssemblyInfo.cs

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


Fix for [[html(¶)]] appearing at the start of comment headings.

git-svn-id: eda3d06fcef731589ace1b284159cead3416df9b@3374 af82e41b-90c4-0310-8c96-b1721e28e2e2

--- templates/ticket.cs
+++ templates/ticket.cs
@@ -101,11 +101,12 @@
        call:commentref('↓', reply) ?><?cs
       /each ?><?cs
      /if ?>)<?cs
-    /if ?>
-     <a href="#comment:<?cs var:change.cnum ?>" class="anchor"
-        title="Permalink to comment:<?cs var:change.cnum ?>">¶<?cs
-   /if ?><?cs
-   var:change.date ?> changed by <?cs var:change.author ?>
+    /if ?><?cs
+   /if ?><?cs
+   var:change.date ?> changed by <?cs var:change.author ?><?cs
+   if:change.cnum ?> <a href="#comment:<?cs var:change.cnum ?>" class="anchor"
+      title="Permalink to comment:<?cs var:change.cnum ?>">¶<?cs
+   /if ?>

<?cs
   if:change.cnum ?>
    <form method="get" action="<?cs var:ticket.href ?>#comment">


Fix HDF node name so that the 'priority' and 'severity' fields are only shown in the ticket overview if there are possible values for those fields.

--- templates/ticket.cs
+++ templates/ticket.cs
@@ -54,11 +54,11 @@

<?cs var:ticket.summary ?>

<?cs
-  if:len(ticket.priorities) ?><?cs
+  if:len(enums.priority) ?><?cs
    call:ticketprop("Priority", "priority", ticket.priority, 0) ?><?cs
   /if ?><?cs
   call:ticketprop("Reporter", "reporter", ticket.reporter, 0) ?><?cs
-  if:len(ticket.severities) ?><?cs
+  if:len(enums.severity) ?><?cs
    call:ticketprop("Severity", "severity", ticket.severity, 0) ?><?cs
   /if ?><?cs
   if ticket.status == "assigned"?><?cs


Show ticket fields (such as component, milestone and version) if possible values are available, not only if a value has actually been set for that ticket.

git-svn-id: eda3d06fcef731589ace1b284159cead3416df9b@1694 af82e41b-90c4-0310-8c96-b1721e28e2e2

--- templates/ticket.cs
+++ templates/ticket.cs
@@ -37,18 +37,12 @@
  /if ?>

- <?cs def:ticketprop(label, name, value, fullrow) ?><?cs
-  if:value ?>
-    <th id="h_<?cs var:name ?>"><?cs var:label ?>:
-    <td headers="h_<?cs var:name ?>"<?cs if:fullrow ?> colspan="3"<?cs /if ?>><?cs
-     var:value ?>
-    	<?cs
-   if:numprops % #2 && !last_prop || fullrow ?>
-

-
<?cs
-   /if ?><?cs
-   set numprops = numprops + #1 - fullrow ?><?cs
-  /if ?><?cs
+ <?cs def:ticketprop(label, name, value, fullrow) ?>
+  <th id="h_<?cs var:name ?>"><?cs var:label ?>:
+  <td headers="h_<?cs var:name ?>"<?cs if:fullrow ?> colspan="3"<?cs /if ?>><?cs
+   var:value ?>	<?cs
+  if:numprops % #2 && !last_prop || fullrow ?>

<?cs /if ?><?cs
+  set numprops = numprops + #1 - fullrow ?><?cs
  /def ?>

@@ -60,19 +54,29 @@

<?cs var:ticket.summary ?>

<?cs
-  call:ticketprop("Priority", "priority", ticket.priority, 0) ?><?cs
+  if:len(ticket.priorities) ?><?cs
+   call:ticketprop("Priority", "priority", ticket.priority, 0) ?><?cs
+  /if ?><?cs
   call:ticketprop("Reporter", "reporter", ticket.reporter, 0) ?><?cs
-  call:ticketprop("Severity", "severity", ticket.severity, 0) ?><?cs
+  if:len(ticket.severities) ?><?cs
+   call:ticketprop("Severity", "severity", ticket.severity, 0) ?><?cs
+  /if ?><?cs
   if ticket.status == "assigned"?><?cs
    call:ticketprop("Assigned to", "assignee", ticket.owner + " (accepted)", 0) ?><?cs
   else ?><?cs
    call:ticketprop("Assigned to", "assignee", ticket.owner, 0) ?><?cs
   /if ?><?cs
-  call:ticketprop("Component", "component", ticket.component, 0) ?><?cs
+  if:len(ticket.components) ?><?cs
+   call:ticketprop("Component", "component", ticket.component, 0) ?><?cs
+  /if ?><?cs
   call:ticketprop("Status", "status", ticket.status, 0) ?><?cs
-  call:ticketprop("Version", "version", ticket.version, 0) ?><?cs
+  if:len(ticket.versions) ?><?cs
+   call:ticketprop("Version", "version", ticket.version, 0) ?><?cs
+  /if ?><?cs
   call:ticketprop("Resolution", "resolution", ticket.resolution, 0) ?><?cs
-  call:ticketprop("Milestone", "milestone", ticket.milestone, 0) ?><?cs
+  if:len(ticket.milestones) ?><?cs
+   call:ticketprop("Milestone", "milestone", ticket.milestone, 0) ?><?cs
+  /if ?><?cs
   set:last_prop = #1 ?><?cs
   call:ticketprop("Keywords", "keywords", ticket.keywords, 0) ?><?cs
   set:last_prop = #0 ?>


Fixup unity compatibility for direct use of source as unity scripts

Required folders (all with their bin and obj folders removed): Messages, ROS_Comm, tf.net, and XmlRpc_Wrapper

--- ROS_Comm/_Init.cs
+++ ROS_Comm/_Init.cs
@@ -9,6 +9,13 @@
 //
 // Created: 09/01/2015
 // Updated: 02/10/2016
+
+#if UNITY
+#define FOR_UNITY
+#endif
+#if ENABLE_MONO
+#define FOR_UNITY
+#endif

 #region USINGZ

@@ -52,7 +59,11 @@
         {
             if (OtherOutput != null)
                 OtherOutput(o);
-            bool toDebugInstead = false;
+            bool toDebugInstead =
+#if FOR_UNITY
+                true;
+#else
+                false;
             try
             {
                 if (Console.CursorVisible) ;
@@ -61,6 +72,7 @@
             {
                 toDebugInstead = true;
             }
+#endif
             if (toDebugInstead)
                 Debug.WriteLine(o);
             else


Add KillSome for ienumerable and GetBodies methods

--- MadCat/NutEngine/Physics/BodiesManager.cs
+++ MadCat/NutEngine/Physics/BodiesManager.cs
@@ -2,6 +2,7 @@
 using NutEngine.Physics.Shapes;
 using System;
 using System.Collections.Generic;
+using System.Linq;

 namespace NutEngine.Physics
 {
@@ -94,7 +95,7 @@
             return true;
         }

-        public bool KillSomeBody(IBody<Shape> body)
+        public bool KillSome(IBody<Shape> body)
         {
             if (!Bodies.Contains(body)) {
                 return false;
@@ -109,5 +110,25 @@
             Bodies.Remove(body);
             return true;
         }
+
+        public bool KillSome(IEnumerable<IBody<Shape>> bodies)
+        {
+            Pairs.RemoveWhere(pair => bodies.Contains(pair.Item1)
+                                   || bodies.Contains(pair.Item2));
+
+            bool result = true;
+            foreach (var body in bodies) {
+                result &= Bodies.Remove(body);
+            }
+
+            return result;
+        }
+
+        public IEnumerable<IBody<Shape>> GetBodies()
+        {
+            foreach (var body in Bodies) {
+                yield return body;
+            }
+        }
     }
 }


fix migratorcontroller

fix migratorcontroller

--- MagicdrawMigrator/MDMigratorController.cs
+++ MagicdrawMigrator/MDMigratorController.cs
@@ -47,8 +47,6 @@
 				correctors.Add(new SetStatesOnObjects(magicDrawReader,model, mdPackage));
 				correctors.Add(new DiagramLayoutCorrector(magicDrawReader,model, mdPackage));
 				correctors.Add(new AddClassifiersToPartitions(magicDrawReader,model, mdPackage));
-				correctors.Add(new CorrectStereotypes(magicDrawReader,model, mdPackage));
-				correctors.Add(new CorrectTaggedValues(magicDrawReader,model, mdPackage));
 			}
 		}
 		public TSF_EA.Package getMagicDrawPackage()


Github check

Github check


fix DataTableBuilder 动态方法报错

fix DataTableBuilder 动态方法报错

--- Masuit.Tools/Database/DataTableBuilder.cs
+++ Masuit.Tools/Database/DataTableBuilder.cs
@@ -32,10 +32,11 @@

         public static DataTableBuilder<T> CreateBuilder(DataRow dataRecord)
         {
-            var generator = new DynamicMethod("DynamicCreateEntity", typeof(T), new[]
+            DynamicMethod methodCreateEntity = new DynamicMethod("DynamicCreateEntity", typeof(T), new[]
             {
                 typeof(DataRow)
-            }, typeof(T), true).GetILGenerator();
+            }, typeof(T), true);
+            var generator = methodCreateEntity.GetILGenerator();
             var result = generator.DeclareLocal(typeof(T));
             generator.Emit(OpCodes.Newobj, typeof(T).GetConstructor(Type.EmptyTypes));
             generator.Emit(OpCodes.Stloc, result);
@@ -65,8 +66,8 @@
             generator.Emit(OpCodes.Ret);
             return new DataTableBuilder<T>
             {
-                _handler = (Load)new DynamicMethod("DynamicCreateEntity", typeof(T), new[] { typeof(DataRow) }, typeof(T), true).CreateDelegate(typeof(Load))
+                _handler = (Load)methodCreateEntity.CreateDelegate(typeof(Load))
             };
         }
     }
-}+}


Add methods (empty)

Add methods (empty)

--- MathSample/DecimalConsole/URealDecimal.cs
+++ MathSample/DecimalConsole/URealDecimal.cs
@@ -40,5 +40,85 @@
             _digits = digits;
             Degree = degree;
         }
+
+        public override string ToString()
+        {
+            return base.ToString();
+        }
+
+        public override bool Equals(object obj)
+        {
+            return base.Equals(obj);
+        }
+
+        public override int GetHashCode()
+        {
+            return base.GetHashCode();
+        }
+
+        public static URealDecimal operator +(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static URealDecimal operator -(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static URealDecimal operator *(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static URealDecimal operator /(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static URealDecimal operator ^(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static bool operator <<(URealDecimal d, int shift)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static bool operator >>(URealDecimal d, int shift)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static bool operator ==(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static bool operator !=(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static bool operator <(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static bool operator >(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static bool operator <=(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
+
+        public static bool operator >=(URealDecimal d1, URealDecimal d2)
+        {
+            throw new NotImplementedException();
+        }
     }
 }


- Adding OnPacketSendOccurred event for WebSocket clients

--- Mixer.Base/Clients/WebSocketClientBase.cs
+++ Mixer.Base/Clients/WebSocketClientBase.cs
@@ -17,6 +17,7 @@
     {
         private const int bufferSize = 1000000;

+        public event EventHandler<WebSocketPacket> OnPacketSentOccurred;
         public event EventHandler<MethodPacket> OnMethodOccurred;
         public event EventHandler<ReplyPacket> OnReplyOccurred;
         public event EventHandler<EventPacket> OnEventOccurred;
@@ -107,6 +108,11 @@
             {
                 this.CurrentPacketID++;
                 this.asyncSemaphore.Release();
+            }
+
+            if (this.OnPacketSentOccurred != null)
+            {
+                this.OnPacketSentOccurred(this, packet);
             }

             return packet.id;


Added Color Backgroudn for ToolBar on Android

--- MusicPickerApp/MusicPickerApp/App.xaml.cs
+++ MusicPickerApp/MusicPickerApp/App.xaml.cs
@@ -14,7 +14,8 @@
             // The root page of your application
             InitializeComponent();
             var rootPage = new NavigationPage(new LoginPage());
-            rootPage.BarBackgroundColor = Color.FromHex("#0000FF");
+            //ToolBar For Android
+            rootPage.BarBackgroundColor = Color.FromHex("#387C13");
             MainPage = rootPage;
             App.Navigation = rootPage.Navigation;


Fix for pagination not working

Fix for pagination not working

--- Mvc.JQuery.Datatables/DataTablesResult.cs
+++ Mvc.JQuery.Datatables/DataTablesResult.cs
@@ -116,7 +116,7 @@
             var result = new DataTablesData
             {
                 iTotalRecords = totalRecords,
-                iTotalDisplayRecords = page.Length,
+                iTotalDisplayRecords = filteredData.Count() + param.iDisplayStart,
                 sEcho = param.sEcho,
                 aaData = page.Cast<object>().ToArray()
             };


closes #162 Caching stream status for a single check. Hopefuly fixes some issues.

--- NadekoBot/Commands/StreamNotifications.cs
+++ NadekoBot/Commands/StreamNotifications.cs
@@ -5,6 +5,7 @@
 using NadekoBot.Modules;
 using Newtonsoft.Json.Linq;
 using System;
+using System.Collections.Concurrent;
 using System.Linq;
 using System.Threading.Tasks;
 using System.Timers;
@@ -18,11 +19,15 @@
         {
             Interval = new TimeSpan(0, 0, 15).TotalMilliseconds,
         };
+
+        private ConcurrentDictionary<string, Tuple<bool, string>> cachedStatuses = new ConcurrentDictionary<string, Tuple<bool, string>>();
+
         public StreamNotifications(DiscordModule module) : base(module)
         {

             checkTimer.Elapsed += async (s, e) =>
             {
+                cachedStatuses.Clear();
                 try
                 {
                     var streams = SpecificConfigurations.Default.AllConfigs.SelectMany(c => c.ObservingStreams);
@@ -74,23 +79,39 @@
             bool isLive;
             string response;
             JObject data;
+            Tuple<bool, string> result;
             switch (stream.Type)
             {
                 case StreamNotificationConfig.StreamType.Hitbox:
-                    response = await SearchHelper.GetResponseStringAsync($"https://api.hitbox.tv/media/status/{stream.Username}");
+                    var hitboxUrl = $"https://api.hitbox.tv/media/status/{stream.Username}";
+                    if (cachedStatuses.TryGetValue(hitboxUrl, out result))
+                        return result;
+                    response = await SearchHelper.GetResponseStringAsync(hitboxUrl);
                     data = JObject.Parse(response);
                     isLive = data["media_is_live"].ToString() == "1";
-                    return new Tuple<bool, string>(isLive, data["media_views"].ToString());
+                    result = new Tuple<bool, string>(isLive, data["media_views"].ToString());
+                    cachedStatuses.TryAdd(hitboxUrl, result);
+                    return result;
                 case StreamNotificationConfig.StreamType.Twitch:
-                    response = await SearchHelper.GetResponseStringAsync($"https://api.twitch.tv/kraken/streams/{Uri.EscapeUriString(stream.Username)}");
+                    var twitchUrl = $"https://api.twitch.tv/kraken/streams/{Uri.EscapeUriString(stream.Username)}";
+                    if (cachedStatuses.TryGetValue(twitchUrl, out result))
+                        return result;
+                    response = await SearchHelper.GetResponseStringAsync(twitchUrl);
                     data = JObject.Parse(response);
                     isLive = !string.IsNullOrWhiteSpace(data["stream"].ToString());
-                    return new Tuple<bool, string>(isLive, isLive ? data["stream"]["viewers"].ToString() : "0");
+                    result = new Tuple<bool, string>(isLive, isLive ? data["stream"]["viewers"].ToString() : "0");
+                    cachedStatuses.TryAdd(twitchUrl, result);
+                    return result;
                 case StreamNotificationConfig.StreamType.Beam:
-                    response = await SearchHelper.GetResponseStringAsync($"https://beam.pro/api/v1/channels/{stream.Username}");
+                    var beamUrl = $"https://beam.pro/api/v1/channels/{stream.Username}";
+                    if (cachedStatuses.TryGetValue(beamUrl, out result))
+                        return result;
+                    response = await SearchHelper.GetResponseStringAsync(beamUrl);
                     data = JObject.Parse(response);
                     isLive = data["online"].ToObject<bool>() == true;
-                    return new Tuple<bool, string>(isLive, data["viewersCurrent"].ToString());
+                    result = new Tuple<bool, string>(isLive, data["viewersCurrent"].ToString());
+                    cachedStatuses.TryAdd(beamUrl, result);
+                    return result;
                 default:
                     break;
             }


cleanup namespaces

cleanup namespaces

--- source/MembershipReboot/WebHost/Startup.cs
+++ source/MembershipReboot/WebHost/Startup.cs
@@ -1,7 +1,4 @@
-using Microsoft.Owin.Security.Facebook;
-using Microsoft.Owin.Security.Google;
-using Microsoft.Owin.Security.Twitter;
-/*
+/*
  * Copyright 2014 Dominick Baier, Brock Allen
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using Owin;
 using WebHost.IdSvr;
 using IdentityManager.Configuration;
@@ -23,6 +21,9 @@
 using WebHost.IdMgr;
 using IdentityManager.Core.Logging;
 using IdentityManager.Logging;
+using Microsoft.Owin.Security.Facebook;
+using Microsoft.Owin.Security.Google;
+using Microsoft.Owin.Security.Twitter;
 using Serilog;

 namespace WebHost


Added resiliency to having no instances in the reservation list.

--- Naos.AWS.Core/InstanceExtensionMethods.cs
+++ Naos.AWS.Core/InstanceExtensionMethods.cs
@@ -180,37 +180,46 @@
                 var typedObjects =
                     response.Reservations.SelectMany(
                         reserveration =>
-                        reserveration.Instances.Select(
-                            _ =>
-                            new Instance
-                                {
-                                    Id = _.InstanceId,
-                                    InstanceType = _.InstanceType,
-                                    Ami = new Ami { Id = _.ImageId },
-                                    ElasticIp =
-                                        new ElasticIp { Region = region, PublicIpAddress = _.PublicIpAddress },
-                                    ContainingSubnet = new Subnet { Id = _.SubnetId },
-                                    Region = region,
-                                    PrivateIpAddress = _.PrivateIpAddress,
-                                    Key = new KeyPair { Region = region, KeyName = _.KeyName },
-                                    SecurityGroup =
-                                        new SecurityGroup
-                                            {
-                                                Region = region,
-                                                Id = _.SecurityGroups.Single().GroupId,
-                                                Name = _.SecurityGroups.Single().GroupName
-                                            },
-                                    Tags = _.Tags.ToDictionary(keyInput => keyInput.Key, valueInput => valueInput.Value),
-                                    MappedVolumes =
-                                        _.BlockDeviceMappings.Select(
-                                            mapping =>
-                                            new EbsVolume
-                                                {
-                                                    DeviceName = mapping.DeviceName,
-                                                    Id = mapping.Ebs.VolumeId,
-                                                    Region = region
-                                                }).ToList()
-                                })).ToList();
+                        (reserveration.Instances != null && reserveration.Instances.Count > 0
+                             ? reserveration.Instances
+                             : new List<Amazon.EC2.Model.Instance>()).Select(
+                                 _ =>
+                                 new Instance
+                                     {
+                                         Id = _.InstanceId,
+                                         InstanceType = _.InstanceType,
+                                         Ami = new Ami { Id = _.ImageId },
+                                         ElasticIp =
+                                             new ElasticIp
+                                                 {
+                                                     Region = region,
+                                                     PublicIpAddress = _.PublicIpAddress
+                                                 },
+                                         ContainingSubnet = new Subnet { Id = _.SubnetId },
+                                         Region = region,
+                                         PrivateIpAddress = _.PrivateIpAddress,
+                                         Key = new KeyPair { Region = region, KeyName = _.KeyName },
+                                         SecurityGroup =
+                                             new SecurityGroup
+                                                 {
+                                                     Region = region,
+                                                     Id = _.SecurityGroups.Single().GroupId,
+                                                     Name = _.SecurityGroups.Single().GroupName
+                                                 },
+                                         Tags =
+                                             _.Tags.ToDictionary(
+                                                 keyInput => keyInput.Key,
+                                                 valueInput => valueInput.Value),
+                                         MappedVolumes =
+                                             _.BlockDeviceMappings.Select(
+                                                 mapping =>
+                                                 new EbsVolume
+                                                     {
+                                                         DeviceName = mapping.DeviceName,
+                                                         Id = mapping.Ebs.VolumeId,
+                                                         Region = region
+                                                     }).ToList()
+                                     })).ToList();

                 // No AddRange on the interface...
                 foreach (var instance in typedObjects)


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Net/WebSockets/WebSocketContext.cs
+++ websocket-sharp/Net/WebSockets/WebSocketContext.cs
@@ -138,8 +138,8 @@
     /// Gets the value of the Sec-WebSocket-Key header included in the request.
     /// </summary>
     /// <remarks>
-    /// This property provides a part of the information used by the server to prove that it
-    /// received a valid WebSocket connection request.
+    /// This property provides a part of the information used by the server to prove that
+    /// it received a valid WebSocket handshake request.
     /// </remarks>
     /// <value>
     /// A <see cref="string"/> that represents the value of the Sec-WebSocket-Key header.


Update Index.cshtml

Update Index.cshtml

--- OneDriveDataRobot/Views/Home/Index.cshtml
+++ OneDriveDataRobot/Views/Home/Index.cshtml
@@ -11,9 +11,7 @@

Sample code project using Microsoft Graph

-

-
-

+


Removed unused constructor

Removed unused constructor

--- OpenIIoT.Core/Packaging/PackageFactory.cs
+++ OpenIIoT.Core/Packaging/PackageFactory.cs
@@ -42,7 +42,6 @@
 namespace OpenIIoT.Core.Packaging
 {
     using System;
-    using System.Diagnostics.CodeAnalysis;
     using System.IO;
     using Newtonsoft.Json;
     using NLog.xLogger;
@@ -51,8 +50,6 @@
     using OpenIIoT.SDK.Packaging.Manifest;
     using OpenIIoT.SDK.Packaging.Operations;
     using OpenIIoT.SDK.Platform;
-    using NLog;
-    using System.Net;

     /// <summary>
     ///     Creates instances of <see cref="IPackage"/> and <see cref="IPackageFactory"/> from disk.
@@ -69,15 +66,6 @@
         #endregion Private Fields

         #region Public Constructors
-
-        /// <summary>
-        ///     Initializes a new instance of the <see cref="PackageFactory"/> class.
-        /// </summary>
-        [ExcludeFromCodeCoverage]
-        public PackageFactory()
-            : this(ApplicationManager.GetInstance().GetManager<IPlatformManager>(), new ManifestExtractor(), new PackageVerifier())
-        {
-        }

         /// <summary>
         ///     Initializes a new instance of the <see cref="PackageFactory"/> class with the specified <paramref name="platformManager"/>.


Using period as body id separator for consistency with RabbitMQ topics

--- Arges.KinectRemote.Sensor/KinectBodyFrameHandler.cs
+++ Arges.KinectRemote.Sensor/KinectBodyFrameHandler.cs
@@ -131,7 +131,7 @@
             var spine = body.Joints[JointType.SpineBase];

             // This is to keep the skeleton entity unique across all devices.
-            d.BodyId = string.Format("{0}-{1}", deviceConnectionId, body.TrackingId.ToString());
+            d.BodyId = string.Format("{0}.{1}", deviceConnectionId, body.TrackingId.ToString());

             // All six bodies are fully tracked. Wee!
             int jointsCount = Enum.GetNames(typeof(KinectJointType)).Length;


#57 の対策

#57 の対策

--- Assets/Plugins/GameCanvas/Scripts/Engine/Graphic.cs
+++ Assets/Plugins/GameCanvas/Scripts/Engine/Graphic.cs
@@ -51,6 +51,7 @@
         private readonly List<Color> cColorsText;
         private readonly List<TextGenerator> cTextGeneratorPool;
         private readonly List<Mesh> cTextMeshPool;
+        private readonly System.Action<Font> cTextRebuildCallback;

         //private readonly List<Mesh[]> cMeshPool;
         //private readonly Queue<UIVertex> cVertsPool;
@@ -107,6 +108,7 @@
             cShaderPropClipRect = Shader.PropertyToID("_ClipRect");
             cTextGeneratorPool = new List<TextGenerator>(20);
             cTextMeshPool = new List<Mesh>(20);
+            cTextRebuildCallback = new System.Action<Font>(onTextTextureRebuild);
             cVertsText = new List<Vector3>();
             cUvsText = new List<Vector2>();
             cTrisText = new List<int>();
@@ -144,6 +146,7 @@
                 mIsEnable = true;
                 cCamera.AddCommandBuffer(CameraEvent.BeforeForwardOpaque, cBufferOpaque);
                 cCamera.AddCommandBuffer(CameraEvent.BeforeForwardAlpha, cBufferTransparent);
+                Font.textureRebuilt += cTextRebuildCallback;
             }
         }

@@ -154,6 +157,7 @@
                 mIsEnable = false;
                 cCamera.RemoveCommandBuffer(CameraEvent.BeforeForwardOpaque, cBufferOpaque);
                 cCamera.RemoveCommandBuffer(CameraEvent.BeforeForwardAlpha, cBufferTransparent);
+                Font.textureRebuilt -= cTextRebuildCallback;
             }
         }

@@ -724,6 +728,14 @@
             return Matrix4x4.TRS(t, r, s);
         }

+        private void onTextTextureRebuild(Font font)
+        {
+            foreach (var generator in cTextGeneratorPool)
+            {
+                generator.Invalidate();
+            }
+        }
+
         #endregion
     }
 }


set window size if create window from wid

--- sources/CETech/Window/Private/WindowSDL.cs
+++ sources/CETech/Window/Private/WindowSDL.cs
@@ -17,6 +17,13 @@
             {
                 throw new Exception(string.Format("Could not create window: {0}", SDL.SDL_GetError()));
             }
+
+
+            int w, h;
+            SDL.SDL_GetWindowSize(_windowPtr, out w, out h);
+
+            Width = w;
+            Height = h;
         }

         private IntPtr _windowPtr;


Refactor method

Refactor method

--- PathAnimatorComponent/Editor/Shortcuts.cs
+++ PathAnimatorComponent/Editor/Shortcuts.cs
@@ -133,7 +133,17 @@
         private float GetNearestBackwardNodeTimestamp() {
             var pathTimestamps = PathAnimator.PathData.GetPathTimestamps();

+            // Get decimal part of the timestamp.
+            var baseTime = Mathf.Floor(PathAnimator.AnimationTimeRatio);
+
+            // Increase timestamp value by the decimal base.
+            for (int i = 0; i < pathTimestamps.Length; i++) {
+                pathTimestamps[i] += baseTime;
+            }
+
             for (var i = pathTimestamps.Length - 1; i >= 0; i--) {
+                //pathTimestamps[i] += baseTime;
+
                 if (pathTimestamps[i] < PathAnimator.AnimationTimeRatio) {
                     return pathTimestamps[i];
                 }


Added checking for connection state broken and added additional logging information.

--- Aurora/DataManagerPlugins/MySQL/MySQLDataManager.cs
+++ Aurora/DataManagerPlugins/MySQL/MySQLDataManager.cs
@@ -48,13 +48,17 @@
                     CheckConnection();
                     m_connection.Ping();
                 }
-                catch (MySqlException)
-                {
+                catch (MySqlException ee)
+                {
+                    m_log.Debug("[MySQLDataLoader] Query", ee);
                     try
                     {
                         m_connection.Close();
                     }
-                    catch { }
+                    catch(Exception e)
+                    {
+                        m_log.Debug("[MySQLDataLoader] GetLockedConnection", e);
+                    }
                     m_locked = false;
                     return GetLockedConnection();
                 }
@@ -66,10 +70,25 @@
         {
             if (m_needsStateChange)
             {
-                //We need to reopen the connection, it timed out
-                if (m_connection.State != ConnectionState.Open)
-                    m_connection.Open ();
-                m_needsStateChange = false;
+                try
+                {
+                    if (m_connection.State == ConnectionState.Broken)
+                    {
+                        m_log.Info("[MySQLDataLoader] Connection state is broken.");
+                        try
+                        {
+                            m_connection.Close();
+                        }
+                        catch (Exception e) { m_log.Debug("[MySQLDataLoader] CheckConnection", e); }
+                    }
+                    if (m_connection.State == ConnectionState.Closed)
+                        m_connection.Open();
+                    m_needsStateChange = false;
+                }
+                catch (Exception e)
+                {
+                    m_log.Debug("[MySQLDataLoader] CheckConnection", e);
+                }
             }
         }

@@ -120,9 +139,9 @@
                 }
                 return dbcommand;
             }
-            catch (Exception)
-            {
-                // Return null if it fails.
+            catch (Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] CloseDatabase", e);
                 return null;
             }
         }
@@ -191,7 +210,7 @@
                     }
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Query", e); }
                 CloseDatabase (dbcon);
             }
         }
@@ -235,7 +254,7 @@
                     }
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Query", e); }
                 CloseDatabase (dbcon);
             }
         }
@@ -279,7 +298,7 @@
                     }
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] QueryFullData", e); }
                 CloseDatabase (dbcon);
             }
         }
@@ -330,8 +349,9 @@

                 }
             }
-            catch (Exception)
-            {
+            catch (Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] Query", e);
                 return new List<string> ();
             }
             finally
@@ -345,7 +365,7 @@
                     }
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Query", e); }
                 CloseDatabase (dbcon);
             }
         }
@@ -388,8 +408,9 @@
                     }
                 }
             }
-            catch
-            {
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] Query", e);
                 return null;
             }
             finally
@@ -403,7 +424,7 @@
                     }
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Query", e); }
                 CloseDatabase (dbcon);
             }
         }
@@ -446,8 +467,9 @@
                     }
                 }
             }
-            catch
-            {
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] QueryNames", e);
                 return null;
             }
             finally
@@ -461,7 +483,7 @@
                     }
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] QueryNames", e); }
                 CloseDatabase (dbcon);
             }
         }
@@ -507,16 +529,17 @@
                     result.ExecuteNonQuery ();
                 }
             }
-            catch (MySqlException)
-            {
-            }
-            finally
-            {
-                try
-                {
-                    if (result != null) result.Dispose ();
-                }
-                catch { }
+            catch (MySqlException e)
+            {
+                m_log.Debug("[MySQLDataLoader] Update", e);
+            }
+            finally
+            {
+                try
+                {
+                    if (result != null) result.Dispose ();
+                }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Update", e); }
                 CloseDatabase (dbcon);
             }
             return true;
@@ -540,17 +563,17 @@
                     result.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
-
-            }
-            finally
-            {
-                try
-                {
-                    if (result != null) result.Dispose ();
-                }
-                catch { }
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] Insert", e);
+            }
+            finally
+            {
+                try
+                {
+                    if (result != null) result.Dispose ();
+                }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Insert", e); }
                 CloseDatabase (dbcon);
             }
             return true;
@@ -586,16 +609,17 @@
                     result.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
-            }
-            finally
-            {
-                try
-                {
-                    if (result != null) result.Dispose ();
-                }
-                catch { }
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] Insert", e);
+            }
+            finally
+            {
+                try
+                {
+                    if (result != null) result.Dispose ();
+                }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Insert", e); }
                 CloseDatabase (dbcon);
             }
             return true;
@@ -641,8 +665,9 @@
                     result.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] Replace", e);
                 return false;
             }
             finally
@@ -651,7 +676,7 @@
                 {
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Replace", e); }
                 CloseDatabase (dbcon);
             }
             return true;
@@ -687,8 +712,9 @@
                     result.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] DirectReplace", e);
                 return false;
             }
             finally
@@ -697,7 +723,7 @@
                 {
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] DirectReplace", e); }
                 CloseDatabase (dbcon);
             }
             return true;
@@ -719,8 +745,9 @@
                     result.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] Insert", e);
                 return false;
             }
             finally
@@ -729,7 +756,7 @@
                 {
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Insert", e); }
                 CloseDatabase (dbcon);
             }
             return true;
@@ -756,8 +783,9 @@
                     result.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] Delete", e);
                 return false;
             }
             finally
@@ -766,7 +794,7 @@
                 {
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Delete", e); }
                 CloseDatabase (dbcon);
             }
             return true;
@@ -803,8 +831,9 @@
                     result.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] Delete", e);
                 return false;
             }
             finally
@@ -813,7 +842,7 @@
                 {
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] Delete", e); }
                 CloseDatabase (dbcon);
             }
             return true;
@@ -832,8 +861,9 @@
                     result.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] DeleteByTime", e);
                 return false;
             }
             finally
@@ -842,7 +872,7 @@
                 {
                     if (result != null) result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] DeleteByTime", e); }
                 CloseDatabase (dbcon);
             }
             return true;
@@ -896,9 +926,9 @@
                     dbcommand.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
-
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] CreateTable", e);
             }
             finally
             {
@@ -945,8 +975,9 @@
                         CheckConnection ();
                         dbcommand.ExecuteNonQuery ();
                     }
-                    catch
-                    {
+                    catch(Exception e)
+                    {
+                        m_log.Debug("[MySQLDataLoader] UpdateTable", e);
                     }
                 }
                 foreach (ColumnDefinition column in modifiedColumns.Values)
@@ -961,8 +992,9 @@
                         CheckConnection ();
                         dbcommand.ExecuteNonQuery ();
                     }
-                    catch
-                    {
+                    catch(Exception e)
+                    {
+                        m_log.Debug("[MySQLDataLoader] UpdateTable", e);
                     }
                 }
                 foreach (ColumnDefinition column in removedColumns.Values)
@@ -977,14 +1009,15 @@
                         CheckConnection ();
                         dbcommand.ExecuteNonQuery ();
                     }
-                    catch
-                    {
-                    }
-                }
-            }
-            catch
-            {
-
+                    catch(Exception e)
+                    {
+                        m_log.Debug("[MySQLDataLoader] UpdateTable", e);
+                    }
+                }
+            }
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] UpdateTable", e);
             }
             finally
             {
@@ -1062,9 +1095,9 @@
                     dbcommand.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
-
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] DropTable", e);
             }
             finally
             {
@@ -1085,9 +1118,9 @@
                     dbcommand.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
-
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] ForceRenameTable", e);
             }
             finally
             {
@@ -1110,9 +1143,9 @@
                     dbcommand.ExecuteNonQuery ();
                 }
             }
-            catch
-            {
-
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] CopyAllDataBetweenMatchingTables", e);
             }
             finally
             {
@@ -1145,9 +1178,7 @@
                     }
                 }
             }
-            catch
-            {
-            }
+            catch (Exception e) { m_log.Debug("[MySQLDataLoader] TableExists", e); }
             finally
             {
                 try
@@ -1160,7 +1191,7 @@
                     if (result != null)
                         result.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] TableExists", e); }
                 CloseDatabase (dbcon);
             }
             if (retVal.Contains (table))
@@ -1191,8 +1222,9 @@
                     defs.Add (new ColumnDefinition { Name = name.ToString (), IsPrimary = pk.ToString () == "PRI", Type = ConvertTypeToColumnType (type.ToString ()) });
                 }
             }
-            catch
-            {
+            catch(Exception e)
+            {
+                m_log.Debug("[MySQLDataLoader] ExtractColumnsFromTable", e);
             }
             finally
             {
@@ -1205,7 +1237,7 @@
                     }
                     if (dbcommand != null) dbcommand.Dispose ();
                 }
-                catch { }
+                catch (Exception e) { m_log.Debug("[MySQLDataLoader] ExtractColumnsFromTable", e); }
                 CloseDatabase (dbcon);
             }
             return defs;


GameDataArchive enumerates library entry ids and player names

--- PiCross/Domain/PiCross/GameDataArchive.cs
+++ PiCross/Domain/PiCross/GameDataArchive.cs
@@ -21,6 +21,28 @@
         private Puzzle ReadPuzzle( StreamReader streamReader )
         {
             return new PuzzleSerializer().Read( streamReader );
+        }
+
+        public IList<int> PuzzleLibraryUIDs
+        {
+            get
+            {
+                return ( from entry in this.zipArchive.Entries
+                         let uid = ExtractEntryID( entry.FullName )
+                         where uid.HasValue
+                         select uid.Value ).ToList();
+            }
+        }
+
+        public IList<string> PlayerNames
+        {
+            get
+            {
+                return ( from entry in this.zipArchive.Entries
+                         let playerName = ExtractPlayerName( entry.FullName )
+                         where playerName != null
+                         select playerName ).ToList();
+            }
         }

         public PuzzleLibraryEntry ReadPuzzleLibraryEntry( int id )
@@ -73,7 +95,7 @@
             return string.Format( "players/{0}.txt", playerName );
         }

-        private static int ExtractEntryID( string filename )
+        private static int? ExtractEntryID( string filename )
         {
             var regex = new Regex( @"^library/entry(\d+)\.txt$" );
             var match = regex.Match( filename );
@@ -84,7 +106,7 @@
             }
             else
             {
-                throw new IOException();
+                return null;
             }
         }

@@ -99,7 +121,7 @@
             }
             else
             {
-                throw new IOException();
+                return null;
             }
         }


more robust errors

more robust errors

--- Producer/Producer.Shared/Utilities/Log.cs
+++ Producer/Producer.Shared/Utilities/Log.cs
@@ -67,7 +67,8 @@
 #else
 		public static void Error (Exception error, string memberName = "", string sourceFilePath = "", int sourceLineNumber = 0)
 		{
-			Error (error.Message, memberName, sourceFilePath, sourceLineNumber);
+			var message = $"{error.Message}{Environment.NewLine}{error.StackTrace}{Environment.NewLine}{error.InnerException?.StackTrace}";
+			Error (message, memberName, sourceFilePath, sourceLineNumber);
 		}
 #endif
 	}


summery fix, and some weird tabbing

summery fix, and some weird tabbing

--- Branch.App/Areas/Halo4/Views/Game/PlayerList.cshtml
+++ Branch.App/Areas/Halo4/Views/Game/PlayerList.cshtml
@@ -143,22 +143,22 @@

-						<div class="tab-pane fade in active summary" id="<%= identifier %>-summary">
+

 									@if (player.IsGuest)
 									{
-
@player.Gamertag

-
GEST

+
@player.Gamertag

+
GEST

 									}
 									else
 									{
-

-										@Html.ActionLink(BranchHelpers.CheckGamertagPrivacy(player.Gamertag), "Index", "ServiceRecord",
+

+											@Html.ActionLink(BranchHelpers.CheckGamertagPrivacy(player.Gamertag), "Index", "ServiceRecord",
 												 new { gamertag = BranchHelpers.CheckGamertagPrivacy(player.Gamertag) }, new Dictionary<string, object>())
-

-
@player.ServiceTag

+

+
@player.ServiceTag

 									}

@@ -196,10 +196,10 @@

 										@if (!String.IsNullOrEmpty(player.FeaturedStatName))
 										{
-

-											@player.FeaturedStatValue
-											@player.FeaturedStatName
-

+

+												@player.FeaturedStatValue
+												@player.FeaturedStatName
+

 										}

@@ -210,55 +210,55 @@

 										@if (player.KilledMostGamertag != null)
 										{
-

-
-												@if (player.KilledMostGamertag == GeneralHelpers.RemoveGuestIdentifier(player.KilledMostGamertag))
+

+
+													@if (player.KilledMostGamertag == GeneralHelpers.RemoveGuestIdentifier(player.KilledMostGamertag))
 													{
 														// Not a Guest
-													@Html.ActionLink(BranchHelpers.CheckGamertagPrivacy(player.KilledMostGamertag), "Index", "ServiceRecord",
+														@Html.ActionLink(BranchHelpers.CheckGamertagPrivacy(player.KilledMostGamertag), "Index", "ServiceRecord",
 															new { gamertag = BranchHelpers.CheckGamertagPrivacy(player.KilledMostGamertag) }, new Dictionary<string, object>())
 													}
 													else
 													{
-													@player.KilledMostGamertag
+														@player.KilledMostGamertag
 													}
-												(@player.KilledMostCount)
-
-											Most Killed
-

+													(@player.KilledMostCount)
+
+												Most Killed
+

 										}
 										else
 										{
-

-											Nobody
-											Most Killed
-

+

+												Nobody
+												Most Killed
+

 										}
 										@if (player.KilledByMostGamertag != null)
 										{
-

-
-												@if (player.KilledMostGamertag == GeneralHelpers.RemoveGuestIdentifier(player.KilledMostGamertag))
+

+
+													@if (player.KilledMostGamertag == GeneralHelpers.RemoveGuestIdentifier(player.KilledMostGamertag))
 													{
 														// Not a Guest
-													@Html.ActionLink(BranchHelpers.CheckGamertagPrivacy(player.KilledByMostGamertag), "Index", "ServiceRecord",
+														@Html.ActionLink(BranchHelpers.CheckGamertagPrivacy(player.KilledByMostGamertag), "Index", "ServiceRecord",
 															 new { gamertag = BranchHelpers.CheckGamertagPrivacy(player.KilledByMostGamertag) }, new Dictionary<string, object>())
 													}
 													else
 													{
-													@player.KilledByMostGamertag
+														@player.KilledByMostGamertag
 													}
-												(@player.KilledByMostCount)
-
-											Most Killed By
-

+													(@player.KilledByMostCount)
+
+												Most Killed By
+

 										}
 										else
 										{
-

-											Nobody
-											Most Killed By
-

+

+												Nobody
+												Most Killed By
+

 										}

 											@player.AverageKillDistance Meters
@@ -306,31 +306,31 @@

 										@if (player.SkillRank == null)
 										{
-

-											0
-											CSR
-

+

+												0
+												CSR
+

 										}
 										else
 										{
-

-											@(player.SkillRank.CompetitiveSkillRank ?? 0)
-											CSR
-

+

+												@(player.SkillRank.CompetitiveSkillRank ?? 0)
+												CSR
+

 										}
 										@if (player.RankName == null)
 										{
-

-											0
-											Rank
-

+

+												0
+												Rank
+

 										}
 										else
 										{
-

-											@player.RankName
-											Rank
-

+

+												@player.RankName
+												Rank
+

 										}


removed comments

removed comments

--- Startup.cs
+++ Startup.cs
@@ -29,18 +29,6 @@

             Helpers.SetupSerilog();

-            // var builder = new ConfigurationBuilder()
-            //                .SetBasePath(env.ContentRootPath)
-            //                .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
-            //                .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
-            //                .AddEnvironmentVariables();
-            // if (env.IsDevelopment())
-            // {
-            //     // For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709
-            //     builder.AddUserSecrets<Startup>();
-            // }
-
-            // Configuration = builder.Build();
         }

         // This method gets called by the runtime. Use this method to add services to the container.


Cosmetic refactring of DataUpdateJobDetails

--- QDMS/EntityModels/DataUpdateJobDetails.cs
+++ QDMS/EntityModels/DataUpdateJobDetails.cs
@@ -11,82 +11,82 @@
 using System.ComponentModel.DataAnnotations;
 using System.ComponentModel.DataAnnotations.Schema;
 using System.Runtime.CompilerServices;
+
 using QDMS.Annotations;

 namespace QDMS
 {
     public class DataUpdateJobDetails : INotifyPropertyChanged
     {
+        private string _name;
+
         [Key]
         [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
         public int ID { get; set; }

         /// <summary>
-        /// Name.
+        ///     Name.
         /// </summary>
         [MaxLength(255)]
         public string Name
         {
-            get
-            {
-                return _name;
-            }
+            get { return _name; }
             set
             {
                 _name = value;
+
                 OnPropertyChanged();
             }
         }

-        private string _name;
-
         /// <summary>
-        /// If true, all instruments with the given tag are matched. If false, a specific instrument is matched.
+        ///     If true, all instruments with the given tag are matched. If false, a specific instrument is matched.
         /// </summary>
         public bool UseTag { get; set; }

         /// <summary>
-        /// If UseTag = false, this instrument's data gets updated.
+        ///     If UseTag = false, this instrument's data gets updated.
         /// </summary>
         public int? InstrumentID { get; set; }

         /// <summary>
-        /// Instrument.
+        ///     Instrument.
         /// </summary>
         public virtual Instrument Instrument { get; set; }

         /// <summary>
-        /// If UseTag = true, instruments having this tag are updated.
+        ///     If UseTag = true, instruments having this tag are updated.
         /// </summary>
         public int? TagID { get; set; }

         /// <summary>
-        /// Tag.
+        ///     Tag.
         /// </summary>
         public virtual Tag Tag { get; set; }

         /// <summary>
-        /// If true, updates will only happen monday through friday.
+        ///     If true, updates will only happen monday through friday.
         /// </summary>
         public bool WeekDaysOnly { get; set; }

         /// <summary>
-        /// The time when the job runs.
+        ///     The time when the job runs.
         /// </summary>
         public TimeSpan Time { get; set; }

         /// <summary>
-        /// The data frequency to be updated.
+        ///     The data frequency to be updated.
         /// </summary>
         public BarSize Frequency { get; set; }

+        #region INotifyPropertyChanged implementation
         public event PropertyChangedEventHandler PropertyChanged;
+        #endregion

         [NotifyPropertyChangedInvocator]
         protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
         {
-            PropertyChangedEventHandler handler = PropertyChanged;
-            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
         }
     }
-}
+}


fix out of range error in CxxStreamReader

A line ending with a slash triggered this error.

--- Qt4VS2003/QtProjectLib/CxxStreamReader.cs
+++ Qt4VS2003/QtProjectLib/CxxStreamReader.cs
@@ -76,7 +76,7 @@
                     {
                         string lineCopy = line;
                         line = "";
-                        for (int i = 0, j = 1; i < lineCopy.Length; ++i, ++j)
+                        for (int i = 0, j = 1; j < lineCopy.Length; ++i, ++j)
                         {
                             if (lineCopy[i] == '/')
                             {