Fixed medium grid issue on home timeline.

--- JustPressPlay/Views/Home/Index.cshtml
+++ JustPressPlay/Views/Home/Index.cshtml
@@ -12,18 +12,18 @@
     {

-

+

                         @foreach( var post in newsList )
                         {

-

+

-

+

                                         @if( post.Controller.Equals( "News" ) )
                                         {

News

@@ -57,7 +57,7 @@

-

+

Recent Activity

@@ -86,9 +86,9 @@

-

+

-
GAMEWIDE STATS

+
Gamewide Stats

@@ -109,7 +109,7 @@

             @if (WebSecurity.IsAuthenticated)
             {
-
YOUR STATS

+
Your Stats


update version

update version

--- King.Azure/Properties/AssemblyInfo.cs
+++ King.Azure/Properties/AssemblyInfo.cs
@@ -11,5 +11,5 @@
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
 [assembly: Guid("4e7ae8fe-0ee3-44a4-bae7-2ea46062c10e")]
-[assembly: AssemblyVersion("1.0.0.12")]
-[assembly: AssemblyFileVersion("1.0.0.12")]+[assembly: AssemblyVersion("1.0.0.13")]
+[assembly: AssemblyFileVersion("1.0.0.13")]


Fix FxCop build issue

Fix FxCop build issue

--- Kudu.Core/Jobs/ContinuousJobRunner.cs
+++ Kudu.Core/Jobs/ContinuousJobRunner.cs
@@ -303,7 +303,7 @@
             }
         }

-        private int GetAvailableJobPort()
+        private static int GetAvailableJobPort()
         {
             var listener = new TcpListener(IPAddress.Loopback, 0);
             try


Fix null reference exception when scene is empty

--- LSLib/Granny/Model/ColladaImporter.cs
+++ LSLib/Granny/Model/ColladaImporter.cs
@@ -611,9 +611,12 @@
                     {
                         foreach (var scene in scenes.visual_scene)
                         {
-                            foreach (var node in scene.node)
+                            if (scene.node != null)
                             {
-                                FindRootBones(null, node, rootBones);
+                                foreach (var node in scene.node)
+                                {
+                                    FindRootBones(null, node, rootBones);
+                                }
                             }
                         }
                     }


Test -> CanResolveConflictsByRemovingFromTheIndex

We're not clearing the conflicts, we're resolving them.  The
difference is that removing from the index means that the items
get moved to the REUC.  "Clearing" or "removing" (in libgit2
terminology, anyway) means that they are removed without being
resolved (or going into the REUC).

--- LibGit2Sharp.Tests/ConflictFixture.cs
+++ LibGit2Sharp.Tests/ConflictFixture.cs
@@ -49,7 +49,7 @@
          * [InlineData(true, "ancestor-only.txt", false, false, FileStatus.Nonexistent, 0)]
          * [InlineData(false, "ancestor-only.txt", false, false, FileStatus.Nonexistent, 0)]
          */
-        public void CanClearConflictsByRemovingFromTheIndex(
+        public void CanResolveConflictsByRemovingFromTheIndex(
             bool removeFromWorkdir, string filename, bool existsBeforeRemove, bool existsAfterRemove, FileStatus lastStatus, int removedIndexEntries)
         {
             var path = CloneMergedTestRepo();


Finally put the paranthesis in the right place

--- LogicAppTemplate/TemplateGenerator.cs
+++ LogicAppTemplate/TemplateGenerator.cs
@@ -481,7 +481,7 @@
                             JObject outputValue = JObject.FromObject(new
                             {
                                 type = "string",
-                                value = "[listCallbackURL(concat(resourceId('Microsoft.Logic/workflows/', parameters('logicAppName'), '/triggers/manual')), '2016-06-01').value]"
+                                value = "[listCallbackURL(concat(resourceId('Microsoft.Logic/workflows/', parameters('logicAppName')), '/triggers/manual'), '2016-06-01').value]"
                             });

                             this.template.outputs.Add("httpTriggerUrl", outputValue);


had break instead of continue in foreach

--- LogicAppTemplate/TemplateGenerator.cs
+++ LogicAppTemplate/TemplateGenerator.cs
@@ -242,11 +242,11 @@
                     //Filter out gateway stuff - can't export to template yet
                     //TODO
                     if ((string)parameter.Value["type"] == "gatewaySetting")
-                        break;
+                        continue;

                     if (((JArray)parameter.Value["uiDefinition"]["constraints"]["capability"]).Count == 1
                         && (string)((JArray)parameter.Value["uiDefinition"]["constraints"]["capability"])[0] == "gateway")
-                        break;
+                        continue;

                     connectionParameters.Add(parameter.Name, $"[parameters('{connectionName + parameter.Name}')]");
                     template.parameters.Add(connectionName + parameter.Name, JObject.FromObject(new { type = parameter.Value["type"] }));


Add test: CanDoRequestManyAsync

Add test: CanDoRequestManyAsync

--- MagicalCryptoWallet.Tests/TorTests.cs
+++ MagicalCryptoWallet.Tests/TorTests.cs
@@ -48,6 +48,19 @@
 			using (var client = new TorHttpClient(new Uri("http://api.qbit.ninja")))
 			{
 				var contents = await QBitTestAsync(client, 2);
+				foreach (var content in contents)
+				{
+					Assert.Equal("\"Good question Holmes !\"", content);
+				}
+			}
+		}
+
+		[Fact]
+		public async Task CanDoRequestManyAsync()
+		{
+			using (var client = new TorHttpClient(new Uri("http://api.qbit.ninja")))
+			{
+				var contents = await QBitTestAsync(client, 15);
 				foreach (var content in contents)
 				{
 					Assert.Equal("\"Good question Holmes !\"", content);


Made activity hook disposable so it is correctly shut down

--- Mamesaver/Windows/UserActivityHook.cs
+++ Mamesaver/Windows/UserActivityHook.cs
@@ -8,6 +8,7 @@
 using System.Reflection;
 using System.Runtime.InteropServices;
 using System.Windows.Forms;
+using Serilog;

 namespace Mamesaver.Windows
 {
@@ -39,7 +40,7 @@
     /// application runes in background or does not have any user interface at all. This class raises
     /// common .NET events with KeyEventArgs and MouseEventArgs so you can easily retrive any information you need.
     /// </summary>
-    public class UserActivityHook : IActivityHook
+    public class UserActivityHook : IActivityHook, IDisposable
     {
         #region Windows structure definitions

@@ -478,13 +479,18 @@
             Start(InstallMouseHook, InstallKeyboardHook);
         }

+        public void Dispose()
+        {
+            //uninstall hooks and do not throw exceptions
+            Stop(true, true, false);
+        }
+
         /// <summary>
         /// Destruction.
         /// </summary>
         ~UserActivityHook()
         {
-            //uninstall hooks and do not throw exceptions
-            Stop(true, true, false);
+            Dispose();
         }

         /// <summary>
@@ -609,6 +615,8 @@
         /// <exception cref="Win32Exception">Any windows problem.</exception>
         public void Stop(bool UninstallMouseHook, bool UninstallKeyboardHook, bool ThrowExceptions)
         {
+            Log.Debug("Stopping activity hook");
+
             //if mouse hook set and must be uninstalled
             if (hMouseHook != 0 && UninstallMouseHook)
             {


Fixed MetroLabel AutoSize behavior ...

Fixed MetroLabel AutoSize behavior ...

--- MetroFramework/Controls/MetroLabel.cs
+++ MetroFramework/Controls/MetroLabel.cs
@@ -114,30 +114,27 @@
             {
                 foreColor = !useStyleColors ? MetroPaint.ForeColor.Label.Normal(Theme) : MetroPaint.GetStyleColor(Style);
             }
-
-            var actualRectangle = ClientRectangle;
-            var flags = MetroPaint.GetTextFormatFlags(TextAlign);
-            var font = MetroFonts.Label(metroLabelSize, metroLabelWeight);
-
-            // Handle resizing when autosizing is enabled.
-            if (AutoSize)
-            {
-                var proposedSize = new Size(int.MaxValue, int.MinValue);
-                var actualSize = TextRenderer.MeasureText(e.Graphics, Text, font, proposedSize, flags);
-                actualRectangle = new Rectangle(ClientRectangle.X, ClientRectangle.Y, actualSize.Width, actualSize.Height);
-                Size = actualSize;
-            }
-
+
             e.Graphics.Clear(backColor);
-            TextRenderer.DrawText(e.Graphics, Text, font, actualRectangle, foreColor, backColor, flags);
-
-
-
+            TextRenderer.DrawText(e.Graphics, Text, MetroFonts.Label(metroLabelSize, metroLabelWeight), ClientRectangle, foreColor, backColor, MetroPaint.GetTextFormatFlags(TextAlign));
         }

         #endregion

         #region Overridden Methods
+
+        public override Size GetPreferredSize(Size proposedSize)
+        {
+            Size preferredSize = base.GetPreferredSize(proposedSize);
+
+            using (Graphics g = CreateGraphics())
+            {
+                proposedSize = new Size(int.MaxValue, int.MaxValue);
+                preferredSize = TextRenderer.MeasureText(g, Text, MetroFonts.Label(metroLabelSize, metroLabelWeight), proposedSize, MetroPaint.GetTextFormatFlags(TextAlign));
+            }
+
+            return preferredSize;
+        }

         protected override void OnEnabledChanged(EventArgs e)
         {


Renames some unit tests.

Renames some unit tests.

--- NFluent.Tests/ContainsExactlyTests.cs
+++ NFluent.Tests/ContainsExactlyTests.cs
@@ -13,14 +13,14 @@
         #region ContainsExactly with arrays

         [Test]
-        public void ContainsExactlyWithArrayOfIntWorks()
+        public void ContainsExactlyWorksWithArrayOfInt()
         {
             var integers = new int[] { 1, 2, 3, 4, 5, 666 };
             Assert.That(integers).ContainsExactly(1, 2, 3, 4, 5, 666);
         }

         [Test]
-        public void ContainsExactlyWithArrayOfStringsWorks()
+        public void ContainsExactlyWorksWithArrayOfStrings()
         {
             var guitarHeroes = new[] { "Hendrix", "Paco de Lucia", "Django Reinhardt", "Baden Powell" };
             Assert.That(guitarHeroes).ContainsExactly("Hendrix", "Paco de Lucia", "Django Reinhardt", "Baden Powell");


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "18.7.0";
-				ClientTag = "dotnet:22-06-19";
+				ClientTag = "dotnet:22-06-20";
 		}

 		#region Properties


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "15.18.0";
-				ClientTag = "dotnet:20-02-25";
+				ClientTag = "dotnet:20-02-26";
 		}

 		#region Properties


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "3.3.0";
-				ClientTag = "dotnet:18-06-09";
+				ClientTag = "dotnet:18-06-10";
 		}

 		#region Properties


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "15.18.0";
-				ClientTag = "dotnet:20-03-02";
+				ClientTag = "dotnet:20-03-03";
 		}

 		#region Properties


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "3.3.0";
-				ClientTag = "dotnet:17-07-03";
+				ClientTag = "dotnet:17-07-04";
 		}

 		#region Properties


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "15.19.0";
-				ClientTag = "dotnet:20-03-25";
+				ClientTag = "dotnet:20-03-26";
 		}

 		#region Properties


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "18.6.0";
-				ClientTag = "dotnet:22-06-08";
+				ClientTag = "dotnet:22-06-09";
 		}

 		#region Properties


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "16.18.0";
-				ClientTag = "dotnet:21-03-13";
+				ClientTag = "dotnet:21-03-14";
 		}

 		#region Properties


Add tests.

Add tests.

--- src/cs/test_cases.cs
+++ src/cs/test_cases.cs
@@ -836,6 +836,36 @@
                 }
             }
         }
+
+        [TestMethod]
+        public void test_table_column_metadata()
+        {
+            using (sqlite3 db = ugly.open(":memory:"))
+            {
+                // out string dataType, out string collSeq, out int notNull, out int primaryKey, out int autoInc
+                db.exec("CREATE TABLE foo (rowid integer primary key asc autoincrement, x int not null);");
+
+                string dataType;
+                string collSeq;
+                int notNull;
+                int primaryKey;
+                int autoInc;
+
+                raw.sqlite3_table_column_metadata(db, "main", "foo", "x", out dataType, out collSeq, out notNull, out primaryKey, out autoInc);
+                Assert.AreEqual(dataType, "int");
+                Assert.AreEqual(collSeq, "BINARY");
+                Assert.IsTrue(notNull > 0);
+                Assert.AreEqual(primaryKey, 0);
+                Assert.AreEqual(autoInc, 0);
+
+                raw.sqlite3_table_column_metadata(db, "main", "foo", "rowid", out dataType, out collSeq, out notNull, out primaryKey, out autoInc);
+                Assert.AreEqual(dataType, "integer");
+                Assert.AreEqual(collSeq, "BINARY");
+                Assert.AreEqual(notNull, 0);
+                Assert.IsTrue(primaryKey > 0);
+                Assert.IsTrue(primaryKey > 0);
+            }
+        }
     }

     [TestClass]


New clientlib ver

New clientlib ver

--- KalturaClient/Client.cs
+++ KalturaClient/Client.cs
@@ -36,7 +36,7 @@
 		public Client(Configuration config) : base(config)
 		{
 				ApiVersion = "18.1.0";
-				ClientTag = "dotnet:22-03-16";
+				ClientTag = "dotnet:22-03-17";
 		}

 		#region Properties


Accept any status code < 400 as success.

--- Katelyn.Core/Crawler.cs
+++ Katelyn.Core/Crawler.cs
@@ -94,7 +94,9 @@
             {
                 var response = client.GetAsync(address).Result;

-                if (!response.IsSuccessStatusCode)
+                int statusCode = (int)response.StatusCode;
+
+                if (statusCode >= 400)
                 {
                     _config.Listener.OnError(address, parent?.AbsoluteUri, new Exception($"{response.StatusCode} ${response.ReasonPhrase}"));
                     return queue;
@@ -264,8 +266,7 @@

         private void QueueIfNew(IDictionary<string, Uri> queue, Uri uri)
         {
-            // Only queue it up if it hasn't been crawled,
-            // and isn't already queued
+            // Only queue it up if it hasn't been queued or crawled
             if (!_crawled.ContainsKey(uri.AbsoluteUri)
                 && !queue.ContainsKey(uri.AbsoluteUri))
             {


Update KeyGenerator/Program.cs

Update KeyGenerator/Program.cs

The format template needed to be updated to accept two fields.

--- KeyGenerator/Program.cs
+++ KeyGenerator/Program.cs
@@ -19,5 +19,5 @@
 	}

 	const string template = @"<add key=""cookieauthentication.encryptionkey"" value=""{0}""/>
-<add key=""cookieauthentication.validationkey"" value=""{2}""/>";
+<add key=""cookieauthentication.validationkey"" value=""{1}""/>";
 }


Improve Network.ListReferences() documentation

--- LibGit2Sharp/Network.cs
+++ LibGit2Sharp/Network.cs
@@ -54,6 +54,12 @@

         /// <summary>
         /// List references in a <see cref="Remote"/> repository.
+        /// <para>
+        /// When the remote tips are ahead of the local ones, the retrieved
+        /// <see cref="DirectReference"/>s may point to non  existing
+        /// <see cref="GitObject"/>s in the local repository. In that
+        /// case, <see cref="DirectReference.Target"/> will return <c>null</c>.
+        /// </para>
         /// </summary>
         /// <param name="remote">The <see cref="Remote"/> to list from.</param>
         /// <returns>The references in the <see cref="Remote"/> repository.</returns>


Updated SetGlobalListener.  Removed redundant Global Listener removal.

--- Assets/HoloToolkit/Input/Scripts/Utilities/SetGlobalListener.cs
+++ Assets/HoloToolkit/Input/Scripts/Utilities/SetGlobalListener.cs
@@ -1,7 +1,6 @@
 // Copyright (c) Microsoft Corporation. All rights reserved.
 // Licensed under the MIT License. See LICENSE in the project root for license information.

-using System.Collections;
 using UnityEngine;

 namespace HoloToolkit.Unity.InputModule
@@ -23,13 +22,5 @@
                 InputManager.Instance.RemoveGlobalListener(gameObject);
             }
         }
-
-        private void OnDestroy()
-        {
-            if (InputManager.Instance != null)
-            {
-                InputManager.Instance.RemoveGlobalListener(gameObject);
-            }
-        }
     }
 }


Add braces

Add braces

--- Assets/HoloToolkit/SharingWithUNET/Scripts/UNetAnchorManager.cs
+++ Assets/HoloToolkit/SharingWithUNET/Scripts/UNetAnchorManager.cs
@@ -304,7 +304,10 @@
             else if (spatialMapping == null)
             {
                 if (UseSpatialMapping)
+                {
                     Debug.Log("No spatial mapping...");
+                }
+
                 ExportAnchorAtPosition(objectToAnchor.transform.position);
             }
             // 3. seek a vertex dense portion of spatial mapping


clean

clean

--- CSharpGL/0Foundations/OpenGLObjects/Framebuffer/Renderbuffer.cs
+++ CSharpGL/0Foundations/OpenGLObjects/Framebuffer/Renderbuffer.cs
@@ -7,7 +7,7 @@
 namespace CSharpGL
 {
     /// <summary>
-    /// Create, update, use and delete a framebuffer object.
+    /// Create, update, use and delete a renderbuffer object.
     /// </summary>
     public partial class Renderbuffer
     {
@@ -23,7 +23,7 @@
         public uint Id { get { return renderbuffer[0]; } }

         /// <summary>
-        /// Create, update, use and delete a framebuffer object.
+        /// Create, update, use and delete a renderbuffer object.
         /// </summary>
         /// <param name="width"></param>
         /// <param name="height"></param>


For each derivied type of an include the type should be added to included base types

--- src/AutoMapper/ProfileMap.cs
+++ src/AutoMapper/ProfileMap.cs
@@ -250,7 +250,8 @@
         private void ApplyDerivedMaps(TypeMapRegistry typeMapRegistry, TypeMap baseMap, TypeMap typeMap)
         {
             foreach (var inheritedTypeMap in typeMap.IncludedDerivedTypes.Select(typeMapRegistry.GetTypeMap).Where(map => map != null))
-            {
+            {
+                inheritedTypeMap.IncludeBaseTypes(typeMap.SourceType, typeMap.DestinationType);
                 inheritedTypeMap.AddInheritedMap(baseMap);
                 ApplyDerivedMaps(typeMapRegistry, baseMap, inheritedTypeMap);
             }


updated Subscription.AddOns to be easier to modify

--- Library/Subscription.cs
+++ Library/Subscription.cs
@@ -155,10 +155,15 @@
             }
         }

+        private List<SubscriptionAddOn> _addOns;
         /// <summary>
         /// List of add ons for this subscription
         /// </summary>
-        public List<SubscriptionAddOn> AddOns { get; set; }
+        public List<SubscriptionAddOn> AddOns
+        {
+            get { return _addOns ?? (_addOns = new List<SubscriptionAddOn>()); }
+            set { _addOns = value; }
+        }

         public int? TotalBillingCycles { get; set; }
         public DateTime? FirstRenewalDate { get; set; }
@@ -389,8 +394,6 @@
                     case "subscription_add_ons":
                         var newList = new SubscriptionAddOnList();
                         newList.ReadXml(reader);
-                        if (AddOns == null)
-                            AddOns = new List<SubscriptionAddOn>();
                         AddOns.AddRange(newList.All);
                         break;

@@ -433,8 +436,6 @@
                     case "subscription_add_ons":
                         var newList = new SubscriptionAddOnList();
                         newList.ReadXml(reader);
-                        if (AddOns == null)
-                            AddOns = new List<SubscriptionAddOn>();
                         AddOns.AddRange(newList.All);
                         break;
                 }


Set user status in Migration seed to Enabled = true

--- Coop_Listing_Site/Coop_Listing_Site/Migrations/Configuration.cs
+++ Coop_Listing_Site/Coop_Listing_Site/Migrations/Configuration.cs
@@ -69,7 +69,8 @@
                     UserName = "test@test.com",
                     Email = "test@test.com",
                     FirstName = "Test",
-                    LastName = "Testman"
+                    LastName = "Testman",
+                    Enabled = true
                 };

                 result1 = userManager.Create(user1, "password1");
@@ -85,7 +86,8 @@
                     UserName = "thinger@test.com",
                     Email = "thinger@test.com",
                     FirstName = "Jon",
-                    LastName = "Doe"
+                    LastName = "Doe",
+                    Enabled = true
                 };

                 result2 = userManager.Create(user2, "password1");
@@ -101,7 +103,8 @@
                     UserName = "testcoord@test.com",
                     Email = "testcoord@test.com",
                     FirstName = "John",
-                    LastName = "Smith"
+                    LastName = "Smith",
+                    Enabled = true
                 };

                 result3 = userManager.Create(user3, "password1");
@@ -159,7 +162,8 @@
                         UserName = "admin@admin.com",
                         Email = "admin@admin.com",
                         FirstName = "Admin",
-                        LastName = "Default"
+                        LastName = "Default",
+                        Enabled = true
                     };

                     var result = userManager.Create(admin, "password1");


If %LOCALAPPDATA% is not writeable, try the TEMP directory

--- src/EmbeddedNativeLibrary.cs
+++ src/EmbeddedNativeLibrary.cs
@@ -133,16 +133,34 @@
         private static string GetLibraryPath(string libraryName, DllInfo dllInfo)
         {
             var dllData = LoadResource(dllInfo.ResourceName);
-
-            var directory =
-                Path.Combine(
-                    Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
-                    libraryName,
-                    GetHash(dllData));
-
-            if (!Directory.Exists(directory))
-            {
-                Directory.CreateDirectory(directory);
+            var hash = GetHash(dllData);
+
+            string directory;
+            var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
+            Exception localApplicationDataException = null;
+            if (!TryGetWritableDirectory(
+                    localAppData, libraryName, hash, out directory, ref localApplicationDataException))
+            {
+                var tempDirectory = Environment.GetEnvironmentVariable("TMP");
+                if (tempDirectory == null)
+                {
+                    tempDirectory = Environment.GetEnvironmentVariable("TEMP");
+                    if (tempDirectory == null)
+                    {
+                        throw new EmbeddedNativeLibraryException(
+                            string.Format("Unable to write to %LOCALAPPDATA% ({0}) and no TEMP directory exists.", localAppData),
+                            localApplicationDataException);
+                    }
+                }
+
+                Exception tempException = null;
+                if (!TryGetWritableDirectory(
+                        tempDirectory, libraryName, hash, out directory, ref tempException))
+                {
+                    throw new EmbeddedNativeLibraryException(
+                        string.Format("Unable to write to %LOCALAPPDATA% ({0}) or the TEMP directory ({1}).", localAppData, tempDirectory),
+                        localApplicationDataException, tempException);
+                }
             }

             var path = WriteDll(dllData, dllInfo.ResourceName, directory);
@@ -158,6 +176,41 @@
             }

             return path;
+        }
+
+        private static bool TryGetWritableDirectory(
+            string root, string libraryName, string hash, out string directory, ref Exception exception)
+        {
+            var dir = Path.Combine(root, libraryName, hash);
+            if (!Directory.Exists(dir))
+            {
+                try
+                {
+                    Directory.CreateDirectory(dir);
+                }
+                catch (UnauthorizedAccessException ex)
+                {
+                    exception = ex;
+                    directory = null;
+                    return false;
+                }
+            }
+
+            try
+            {
+                var filePath = Path.Combine(dir, Path.GetRandomFileName());
+                using (var stream = File.Create(filePath)) stream.WriteByte(1);
+                File.Delete(filePath);
+            }
+            catch (UnauthorizedAccessException ex)
+            {
+                exception = ex;
+                directory = null;
+                return false;
+            }
+
+            directory = dir;
+            return true;
         }

         private static string WriteDll(byte[] dllData, string resourceName, string directory)


Modified unit tests

Modified unit tests

Added number generators, waiting for FsCheck to be available for xUnit 2
to make more.

--- src/Emulator.Test/CpuTest.cs
+++ src/Emulator.Test/CpuTest.cs
@@ -263,59 +263,77 @@
             Assert.Equal(new Word(4).ToString(), cpu.Status.ProgramCounter.ToString());
         }

-        [Fact]
-        public void LDA()
-        {
-            var program = new Assembler.Assembler().Assemble(new String[]
-                {
-                    "LDA #$77"    //2 cycles
-                });
-
-            var cpu = new Cpu();
-
-            cpu.Execute(0, program.ToArray());
-
-            Assert.Equal(0x77, cpu.Status.Accumulator);
+        [Theory]
+        [MemberData("LDA_Data")]
+        public void LDA(byte b)
+        {
+            var program = new Assembler.Assembler().Assemble(new String[]
+                {
+                    String.Format("LDA #${0:X}", b) //2 cycles
+                });
+
+            var cpu = new Cpu();
+
+            cpu.Execute(0, program.ToArray());
+
+            Assert.Equal(b, cpu.Status.Accumulator);
             Assert.False(cpu.Status.Flags.Negative);
             Assert.False(cpu.Status.Flags.Zero);
             Assert.Equal(2ul, cpu.Status.Cycles);
             Assert.Equal(new Word(2).ToString(), cpu.Status.ProgramCounter.ToString());
         }

-        [Fact]
-        public void LDA_Zero()
-        {
-            var program = new Assembler.Assembler().Assemble(new String[]
-                {
-                    "LDA #$00"    //2 cycles
-                });
-
-            var cpu = new Cpu();
-
-            cpu.Execute(0, program.ToArray());
-
-            Assert.Equal(0x00, cpu.Status.Accumulator);
-            Assert.False(cpu.Status.Flags.Negative);
-            Assert.True(cpu.Status.Flags.Zero);
+        public static IEnumerable<object[]> LDA_Data
+        {
+            get
+            {
+                return Enumerable.Range(1, 127).Select(i => (byte)i).Select(b => new object[] { b }).ToList().AsEnumerable();
+            }
+        }
+
+        [Theory]
+        [MemberData("LDA_Negative_Data")]
+        public void LDA_Negative(byte b)
+        {
+            var program = new Assembler.Assembler().Assemble(new String[]
+                {
+                    String.Format("LDA #${0:X}", b) //2 cycles
+                });
+
+            var cpu = new Cpu();
+
+            cpu.Execute(0, program.ToArray());
+
+            Assert.Equal(b, cpu.Status.Accumulator);
+            Assert.True(cpu.Status.Flags.Negative);
+            Assert.False(cpu.Status.Flags.Zero);
             Assert.Equal(2ul, cpu.Status.Cycles);
             Assert.Equal(new Word(2).ToString(), cpu.Status.ProgramCounter.ToString());
         }

-        [Fact]
-        public void LDA_Negative()
-        {
-            var program = new Assembler.Assembler().Assemble(new String[]
-                {
-                    "LDA #$85"    //2 cycles
-                });
-
-            var cpu = new Cpu();
-
-            cpu.Execute(0, program.ToArray());
-
-            Assert.Equal(0x85, cpu.Status.Accumulator);
-            Assert.True(cpu.Status.Flags.Negative);
-            Assert.False(cpu.Status.Flags.Zero);
+        public static IEnumerable<object[]> LDA_Negative_Data
+        {
+            get
+            {
+                return Enumerable.Range(128, 128).Select(i => (byte)i).Select(b => new object[] { b }).ToList().AsEnumerable();
+            }
+        }
+
+        [Fact]
+        public void LDA_Zero()
+        {
+            var program = new Assembler.Assembler().Assemble(new String[]
+                {
+                    "LDA #$00"    //2 cycles
+                });
+
+            var cpu = new Cpu();
+
+            cpu.Execute(0, program.ToArray());
+
+            Assert.Equal(0x00, cpu.Status.Accumulator);
+            Assert.False(cpu.Status.Flags.Negative);
+            Assert.True(cpu.Status.Flags.Zero);
             Assert.Equal(2ul, cpu.Status.Cycles);
             Assert.Equal(new Word(2).ToString(), cpu.Status.ProgramCounter.ToString());
         }
@@ -1150,23 +1168,34 @@
             Assert.True(cpu.Status.Flags.Decimal);
         }

-        [Fact]
-        public void ADC()
-        {
-            var program = new Assembler.Assembler().Assemble(new String[]
-                {
-                    "LDA #$2B",
-                    "ADC $#44"
-                });
-
-            var cpu = new Cpu();
-            cpu.Execute(0, program.ToArray());
-
-            Assert.Equal(0x6F, cpu.Status.Accumulator);
+        [Theory]
+        [MemberData("ADC_Data")]
+        public void ADC(byte b)
+        {
+            var program = new Assembler.Assembler().Assemble(new String[]
+                {
+                    "LDA #$01",                         //2 cycles
+                    String.Format("ADC #${0:X}", b)     //2 cycles
+                });
+
+            var cpu = new Cpu();
+            cpu.Execute(0, program.ToArray());
+
+            Assert.Equal(b + 1, cpu.Status.Accumulator);
             Assert.False(cpu.Status.Flags.Carry);
             Assert.False(cpu.Status.Flags.Zero);
             Assert.False(cpu.Status.Flags.Overflow);
             Assert.False(cpu.Status.Flags.Negative);
+            Assert.Equal(4ul, cpu.Status.Cycles);
+            Assert.Equal(new Word(4).ToString(), cpu.Status.ProgramCounter.ToString());
+        }
+
+        public static IEnumerable<object[]> ADC_Data
+        {
+            get
+            {
+                return Enumerable.Range(0, 126).Select(i => new object[] { (byte)i }).ToList().AsEnumerable();
+            }
         }

         [Fact]
@@ -1188,23 +1217,34 @@
             Assert.False(cpu.Status.Flags.Negative);
         }

-        [Fact]
-        public void ADC_Negative()
-        {
-            var program = new Assembler.Assembler().Assemble(new String[]
-                {
-                    "LDA #$82",
-                    "ADC $#12"
-                });
-
-            var cpu = new Cpu();
-            cpu.Execute(0, program.ToArray());
-
-            Assert.Equal(0x94, cpu.Status.Accumulator);
+        [Theory]
+        [MemberData("ADC_Negative_Data")]
+        public void ADC_Negative(byte b)
+        {
+            var program = new Assembler.Assembler().Assemble(new String[]
+                {
+                    "LDA #$01",                         //2 cycles
+                    String.Format("ADC #${0:X}", b)     //2 cycles
+                });
+
+            var cpu = new Cpu();
+            cpu.Execute(0, program.ToArray());
+
+            Assert.Equal(b + 1, cpu.Status.Accumulator);
             Assert.False(cpu.Status.Flags.Carry);
             Assert.False(cpu.Status.Flags.Zero);
             Assert.False(cpu.Status.Flags.Overflow);
             Assert.True(cpu.Status.Flags.Negative);
+            Assert.Equal(4ul, cpu.Status.Cycles);
+            Assert.Equal(new Word(4).ToString(), cpu.Status.ProgramCounter.ToString());
+        }
+
+        public static IEnumerable<object[]> ADC_Negative_Data
+        {
+            get
+            {
+                return Enumerable.Range(128, 127).Select(i => new object[] { (byte)i }).ToList().AsEnumerable();
+            }
         }

         [Fact]


Fix issue with retry util not bubbling up the correct exception

--- src/Foundatio/Utility/Run.cs
+++ src/Foundatio/Utility/Run.cs
@@ -19,8 +19,11 @@
             return Task.WhenAll(Enumerable.Range(1, iterations).Select(i => Task.Run(() => work(i))));
         }

-        public static Task WithRetriesAsync(Func<Task> action, int maxAttempts = 5, TimeSpan? retryInterval = null, CancellationToken cancellationToken = default, ILogger logger = null) {
-            return WithRetriesAsync(() => action().ContinueWith(t => Task.CompletedTask, TaskContinuationOptions.OnlyOnRanToCompletion), maxAttempts, retryInterval, cancellationToken, logger);
+        public static async Task WithRetriesAsync(Func<Task> action, int maxAttempts = 5, TimeSpan? retryInterval = null, CancellationToken cancellationToken = default, ILogger logger = null) {
+            await WithRetriesAsync<object>(async () => {
+                await action().AnyContext();
+                return null;
+            }, maxAttempts, retryInterval, cancellationToken, logger);
         }

         public static async Task<T> WithRetriesAsync<T>(Func<Task<T>> action, int maxAttempts = 5, TimeSpan? retryInterval = null, CancellationToken cancellationToken = default, ILogger logger = null) {