Implemented search ByUser

Implemented search ByUser

--- Gamedalf.Services/PaymentService.cs
+++ Gamedalf.Services/PaymentService.cs
@@ -5,26 +5,39 @@
 using System.Collections.Generic;
 using System.Data.Entity;
 using System.Linq;
-using System.Threading.Tasks;
-
-namespace Gamedalf.Services
-{
-    public class PaymentService: Service<Payment>
-    {
-        public PaymentService(ApplicationDbContext db): base(db){}
-
-        public virtual async Task<ICollection<Payment>> Search(string q)
-        {
-            if (String.IsNullOrEmpty(q))
-            {
-                return await All();
-            }
-
-            return await Db.Payments
-                .Where(e => e.Player.UserName.Contains(q))
-                .OrderBy(e => e.Player)
-                .ToListAsync();
-        }
-
-    }
-}
+using System.Threading.Tasks;
+
+namespace Gamedalf.Services
+{
+    public class PaymentService: Service<Payment>
+    {
+        public PaymentService(ApplicationDbContext db): base(db){}
+
+        public virtual async Task<ICollection<Payment>> Search(string q)
+        {
+            if (String.IsNullOrEmpty(q))
+            {
+                return await All();
+            }
+
+            return await Db.Payments
+                .Where(e => e.Player.UserName.Contains(q))
+                .OrderBy(e => e.Player)
+                .ToListAsync();
+        }
+
+        public virtual async Task<ICollection<Payment>> ByUser(string id)
+        {
+            if (String.IsNullOrEmpty(id))
+            {
+                return await All();
+            }
+
+            return await Db.Payments
+                .Where(e => e.Player.Id == id)
+                .OrderBy(e => e.Player)
+                .ToListAsync();
+        }
+
+    }
+}


Enforce CLS compliance.

Enforce CLS compliance.

--- Geometry/Properties/AssemblyInfo.cs
+++ Geometry/Properties/AssemblyInfo.cs
@@ -2,7 +2,7 @@
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;

-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("Geometry")]
@@ -14,8 +14,8 @@
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
 // COM, set the ComVisible attribute to true on that type.
 [assembly: ComVisible(false)]

@@ -25,12 +25,15 @@
 // Version information for an assembly consists of the following four values:
 //
 //      Major Version
-//      Minor Version
+//      Minor Version
 //      Build Number
 //      Revision
 //
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
+
+// Enforce CLS compliance.
+[assembly: System.CLSCompliant(true)]


dispose in deconstructor

dispose in deconstructor

--- Happer/Happer.Http/RequestStream.cs
+++ Happer/Happer.Http/RequestStream.cs
@@ -191,7 +191,10 @@
         {
             if (this.isSafeToDisposeStream)
             {
-                ((IDisposable)this.stream).Dispose();
+                if (this.stream != null)
+                {
+                    this.stream.Dispose();
+                }

                 var fileStream = this.stream as FileStream;
                 if (fileStream != null)
@@ -203,6 +206,11 @@
             base.Dispose(disposing);
         }

+        ~RequestStream()
+        {
+            this.Dispose(false);
+        }
+
         private void ShiftStreamToFileStreamIfNecessary()
         {
             if (this.disableStreamSwitching)


+"Last" argument position enum value

+"Last" argument position enum value

This needs to come with some extra stuff to ensure we can safely add enum values, because some places in the code depend on checking ranges, knowing the first/last enum values.

--- src/ArguMint/ArguMint/ArgumentPosition.cs
+++ src/ArguMint/ArguMint/ArgumentPosition.cs
@@ -12,6 +12,7 @@
       Seventh,
       Eighth,
       Ninth,
-      Tenth
+      Tenth,
+      Last
    }
 }


Add ImportWikiTestAsync

Add ImportWikiTestAsync

--- src/Backlog4net.Test/ImportMethodsTest.cs
+++ src/Backlog4net.Test/ImportMethodsTest.cs
@@ -78,5 +78,21 @@

             await client.DeleteIssueAsync(issue.Id);
         }
+
+        [TestMethod]
+        public async Task ImportWikiTestAsync()
+        {
+            var wiki = await client.ImportWikiAsync(new ImportWikiParams(projectId, "ImportWikiTest", "ImportWikiTestContent")
+            {
+                CreatedUserId = anotherUser.Id,
+                Created = new DateTime(2017, 8, 1, 10, 5, 10, DateTimeKind.Utc),
+                UpdatedUserId = anotherUser.Id,
+                Updated = new DateTime(2017, 8, 2, 10, 5, 10, DateTimeKind.Utc),
+            });
+            Assert.AreEqual(wiki.CreatedUser.Id, anotherUser.Id);
+            Assert.AreEqual(wiki.Created, new DateTime(2017, 8, 1, 10, 5, 10, DateTimeKind.Utc));
+
+            await client.DeleteWikiAsync(wiki.Id, false);
+        }
     }
 }


Fixing the FieldTypes tests.

Fixing the FieldTypes tests.

--- eFormSDK.Tests/FieldTypesUTest.cs
+++ eFormSDK.Tests/FieldTypesUTest.cs
@@ -15,11 +15,13 @@
         public async Task FieldType_Create_DoesCreate()
         {
             //Arrange
-
-            field_types fieldType = new field_types();
-            fieldType.Description = Guid.NewGuid().ToString();
-            fieldType.FieldType = Guid.NewGuid().ToString();
-
+
+            field_types fieldType = new field_types
+            {
+                Description = Guid.NewGuid().ToString(),
+                FieldType = Guid.NewGuid().ToString()
+            };
+
             //Act

             List<field_types> fieldTypes = dbContext.field_types.AsNoTracking().ToList();
@@ -38,16 +40,21 @@
             Assert.AreEqual(fieldType.Description, fieldTypes[19].Description);
             Assert.AreEqual(fieldType.Id, fieldTypes[19].Id);
             Assert.AreEqual(fieldType.FieldType, fieldTypes[19].FieldType);
+
+            dbContext.field_types.Remove(fieldType);
+            await dbContext.SaveChangesAsync();
         }

         [Test]
         public async Task FieldType_Update_DoesUpdate()
         {
             //Arrange
-
-            field_types fieldType = new field_types();
-            fieldType.Description = Guid.NewGuid().ToString();
-            fieldType.FieldType = Guid.NewGuid().ToString();
+
+            field_types fieldType = new field_types
+            {
+                Description = Guid.NewGuid().ToString(),
+                FieldType = Guid.NewGuid().ToString()
+            };
             await fieldType.Create(dbContext);

             //Act
@@ -68,16 +75,21 @@
             Assert.AreEqual(fieldType.Description, fieldTypes[19].Description);
             Assert.AreEqual(fieldType.Id, fieldTypes[19].Id);
             Assert.AreEqual(fieldType.FieldType, fieldTypes[19].FieldType);
+
+            dbContext.field_types.Remove(fieldType);
+            await dbContext.SaveChangesAsync();
         }

         [Test]
         public async Task FieldType_Delete_DoesDelete()
         {
             //Arrange
-
-            field_types fieldType = new field_types();
-            fieldType.Description = Guid.NewGuid().ToString();
-            fieldType.FieldType = Guid.NewGuid().ToString();
+
+            field_types fieldType = new field_types
+            {
+                Description = Guid.NewGuid().ToString(),
+                FieldType = Guid.NewGuid().ToString()
+            };
             await fieldType.Create(dbContext);

             //Act
@@ -95,7 +107,8 @@

             fieldTypes = dbContext.field_types.AsNoTracking().ToList();

-            Assert.AreEqual(19, fieldTypes.Count());
+            Assert.AreEqual(19, fieldTypes.Count());
+
         }
     }
 }


Disable Raven's Embedded HTTP server

Disable Raven's Embedded HTTP server

I'm not really making use of this, and it's preventing successful
deployment in Azure.

--- src/CGO.Web/NinjectModules/RavenModule.cs
+++ src/CGO.Web/NinjectModules/RavenModule.cs
@@ -20,7 +20,6 @@
             var documentStore = new EmbeddableDocumentStore
             {
                 DataDirectory = "CGO.raven",
-                UseEmbeddedHttpServer = true,
                 Configuration = { Port = 28645 }
             };


fixed issue related to app center & request duration

--- src/CSharpClient/Bit.CSharpClient.Prism/ViewModel/Implementations/AppCenterTelemetryService.cs
+++ src/CSharpClient/Bit.CSharpClient.Prism/ViewModel/Implementations/AppCenterTelemetryService.cs
@@ -89,7 +89,7 @@
                 if (!properties.ContainsKey("Timestamp"))
                     properties.Add("Timestamp", startTime.ToString(CultureInfo.InvariantCulture)); /*Based on Microsoft.ApplicationInsights.DataContracts.RequestTelemetry*/
                 if (!properties.ContainsKey("Duration"))
-                    properties.Add("Duration", responseCode);
+                    properties.Add("Duration", duration.ToString());
                 if (!properties.ContainsKey("Success"))
                     properties.Add("Success", success.ToString(CultureInfo.InvariantCulture));
                 if (!properties.ContainsKey("Url"))


Added example code for cake aliases

Added example code for cake aliases

--- src/Cake.Common/Tools/Cake/CakeAliases.cs
+++ src/Cake.Common/Tools/Cake/CakeAliases.cs
@@ -15,6 +15,11 @@
         ///
         /// <param name="context">The context.</param>
         /// <param name="cakeScriptPath">The script file.</param>
+        /// <example>
+        ///
+        /// CakeExecuteScript("./helloworld.cake");
+        ///
+        /// </example>
         [CakeMethodAlias]
         public static void CakeExecuteScript(this ICakeContext context, FilePath cakeScriptPath)
         {
@@ -27,6 +32,11 @@
         /// <param name="context">The context.</param>
         /// <param name="cakeScriptPath">The script file.</param>
         /// <param name="settings">The settings <see cref="CakeSettings"/>.</param>
+        /// <example>
+        ///
+        /// CakeExecuteScript("./helloworld.cake", new CakeSettings{ ToolPath="./Cake.exe" });
+        ///
+        /// </example>
         [CakeMethodAlias]
         public static void CakeExecuteScript(this ICakeContext context, FilePath cakeScriptPath, CakeSettings settings)
         {
@@ -44,6 +54,11 @@
         ///
         /// <param name="context">The context.</param>
         /// <param name="cakeExpression">The cake expression</param>
+        /// <example>
+        ///
+        /// CakeExecuteExpression("Information(\"Hello {0}\", \"World\");");
+        ///
+        /// </example>
         [CakeMethodAlias]
         public static void CakeExecuteExpression(this ICakeContext context, string cakeExpression)
         {
@@ -56,6 +71,16 @@
         /// <param name="context">The context.</param>
         /// <param name="cakeExpression">The cake expression</param>
         /// <param name="settings">The settings <see cref="CakeSettings"/>.</param>
+        /// <example>
+        ///
+        /// CakeExecuteExpression(
+        ///     "Information(\"Hello {0}!\", Argument<string>(\"name\"));",
+        ///     new CakeSettings {
+        ///         ToolPath="./Cake.exe" ,
+        ///         Arguments = new Dictionary<string, string>{{"name", "World"}}
+        ///         });
+        ///
+        /// </example>
         [CakeMethodAlias]
         public static void CakeExecuteExpression(this ICakeContext context, string cakeExpression, CakeSettings settings)
         {


Added testcase for https://github.com/GitTools/GitVersion/issues/557#issue-99349268

--- src/GitVersionCore.Tests/VersionCalculation/Strategies/MergeMessageBaseVersionStrategyTests.cs
+++ src/GitVersionCore.Tests/VersionCalculation/Strategies/MergeMessageBaseVersionStrategyTests.cs
@@ -85,6 +85,7 @@
         [TestCase(@"Merge branch 'develop' of http://10.0.6.3/gitblit/r/... into develop")]
         [TestCase(@"Merge branch 'master' of http://172.16.3.10:8082/r/asu_tk/p_sd")]
         [TestCase(@"Merge branch 'master' of http://212.248.89.56:8082/r/asu_tk/p_sd")]
+        [TestCase(@"Merge branch 'DEMO' of http://10.10.10.121/gitlab/mtolland/orcid into DEMO")]
         public void MergeMessagesThatIsNotRelatedToGitVersion(string commitMessage)
         {


minor refactoring ot FormsAuthService

minor refactoring ot FormsAuthService

--- src/Contrive.Auth.Web/FormsAuthService.cs
+++ src/Contrive.Auth.Web/FormsAuthService.cs
@@ -37,7 +37,11 @@
             }
         }

-        public IUser CurrentUser { get { return Context.Items[CURRENT_USER_KEY].As<IUser>(); } private set { Context.Items[CURRENT_USER_KEY] = value; } }
+        public IUser CurrentUser
+        {
+            get { return Context.Items[CURRENT_USER_KEY].As<IUser>(); }
+            private set { Context.Items[CURRENT_USER_KEY] = value; }
+        }

         /// <summary>
         ///     To be called on authenticate request with Application.User
@@ -101,13 +105,6 @@
             return FormsAuthentication.Decrypt(cookieValue);
         }

-        static HttpCookie GetCurrentCookie()
-        {
-            var cookieName = FormsAuthentication.FormsCookieName;
-            var authCookie = Context.Request.Cookies[cookieName];
-            return authCookie;
-        }
-
         static FormsAuthenticationTicket NewTicket(DateTime expires, bool stayLoggedIn)
         {
             return new FormsAuthenticationTicket(2, "", DateTime.Now, expires, stayLoggedIn, "");
@@ -129,6 +126,13 @@
             cookie.Value = FormsAuthentication.Encrypt(ticket);
             cookie.Expires = ticket.Expiration;
             return cookie;
+        }
+
+        static HttpCookie GetCurrentCookie()
+        {
+            var cookieName = FormsAuthentication.FormsCookieName;
+            var authCookie = Context.Request.Cookies[cookieName];
+            return authCookie;
         }

         /// <summary>


Update version number.

Update version number.

--- editor/Properties/AssemblyInfo.cs
+++ editor/Properties/AssemblyInfo.cs
@@ -31,4 +31,4 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.82.*")]
+[assembly: AssemblyVersion("1.83.*")]


Changement des textes de description des prix pour indiquer de les entrer en copper

--- ArcheageCraft/ArcheageCraft/Views/Home/_Items.cshtml
+++ ArcheageCraft/ArcheageCraft/Views/Home/_Items.cshtml
@@ -14,7 +14,7 @@
         <input type="text" data-bind="value:newItemMerchantCost" />
         Vocation badge cost
         <input type="text" data-bind="value:newItemVocationBadgesCost" />
-
Set to 0 if not buyable

+
All prices are in copper: For 1g8s30c write 10830. Set prices to 0 if not buyable.

         <button data-bind="click:create">Create</button>
     </fieldset>
 </script>
@@ -26,7 +26,7 @@
     <input type="text" data-bind="value:merchantCost" />
     Vocation badge cost
     <input type="text" data-bind="value:vocationBadgeCost" />
-
Set to 0 if not buyable

+
All prices are in copper: For 1g8s30c write 10830. Set prices to 0 if not buyable.

     <button data-bind="click:update">Update</button>
     <button data-bind="click:remove">Delete item</button>


Minor refactoring

Minor refactoring

--- src/Firebase.Auth/FirebaseAuthProvider.cs
+++ src/Firebase.Auth/FirebaseAuthProvider.cs
@@ -45,18 +45,9 @@
         {
             string content = $"{{\"token\":\"{customToken}\",\"returnSecureToken\":true}}";
             FirebaseAuthLink firebaseAuthLink = await this.ExecuteWithPostContentAsync(GoogleCustomAuthUrl, content).ConfigureAwait(false);
+
             firebaseAuthLink.User = await this.GetUserAsync(firebaseAuthLink.FirebaseToken);
             return firebaseAuthLink;
-        }
-
-        private async Task<User> GetUserAsync(string idToken)
-        {
-            var content = $"{{\"idToken\":\"{idToken}\"}}";
-            var response = await this.client.PostAsync(new Uri(string.Format(GoogleGetUser, this.authConfig.ApiKey)), new StringContent(content, Encoding.UTF8, "application/json"));
-
-            JObject resultJson = JObject.Parse(await response.Content.ReadAsStringAsync());
-            var user = JsonConvert.DeserializeObject<User>(resultJson["users"].First().ToString());
-            return user;
         }

         /// <summary>
@@ -199,6 +190,16 @@
         public void Dispose()
         {
             this.client.Dispose();
+        }
+
+        private async Task<User> GetUserAsync(string idToken)
+        {
+            var content = $"{{\"idToken\":\"{idToken}\"}}";
+            var response = await this.client.PostAsync(new Uri(string.Format(GoogleGetUser, this.authConfig.ApiKey)), new StringContent(content, Encoding.UTF8, "application/json"));
+
+            JObject resultJson = JObject.Parse(await response.Content.ReadAsStringAsync());
+            var user = JsonConvert.DeserializeObject<User>(resultJson["users"].First().ToString());
+            return user;
         }

         private async Task<FirebaseAuthLink> ExecuteWithPostContentAsync(string googleUrl, string postContent)


Remove dust clouds when knocking on nothing


changes done

changes done

--- Autopilot/Autopilot/Controllers/TwitterController.cs
+++ Autopilot/Autopilot/Controllers/TwitterController.cs
@@ -20,6 +20,25 @@
         }

         // GET: /SocialMedia/
-
+        public IHttpActionResult TwitterAuth()
+        {
+            var URI = _twitterService.Authorize();
+            return new RedirectResult(URI, false /*permanent*/);
+
+        }
+
+        public IHttpActionResult Reconnect()
+        {
+            try
+            {
+                return RedirectToAction("TwitterAuth");
+            }
+            catch (Exception)
+            {
+
+                throw;
+            }
+        }
+
     }
 }


Adjust invoice badge styling (#1906)

Adjust invoice badge styling (#1906)

--- BTCPayServer/Views/Wallets/WalletTransactions.cshtml
+++ BTCPayServer/Views/Wallets/WalletTransactions.cshtml
@@ -28,8 +28,14 @@
         text-overflow: ellipsis;
     }

-    .transactionLabel:not(:last-child) {
+    .badge-container:not(:last-child) {
         margin-bottom: 4px;
+    }
+
+    .badge-container {
+        display: flex;
+        align-items: center;
+        flex-wrap: nowrap;
     }

     .removeTransactionLabelForm {
@@ -39,14 +45,19 @@
     }

     .removeTransactionLabelForm button {
-        color: #212529;
         cursor: pointer;
         display: inline;
         padding: 0;
         background-color: transparent;
         border: 0;
     }
-</style>
+
+    .transaction-details-icon {
+        position: relative;
+        padding-left: 12px;
+        left: -8px;
+    }
+</style>
 @if (TempData.HasStatusMessage())
 {

@@ -106,30 +117,37 @@

                             @foreach (var label in transaction.Labels)
                             {
-

-                                     @label.Value
-
+

+

+                                        @label.Value
+
+                                        <form
+                                            asp-route-walletId="@this.Context.GetRouteValue("walletId")"
+                                            asp-action="ModifyTransaction"
+                                            method="post"
+                                            class="removeTransactionLabelForm">
+                                            <input type="hidden" name="transactionId" value="@transaction.Id"/>
+                                            <button
+                                                name="removelabel"
+                                                style="color: @label.Color; filter: brightness(0.5);"
+                                                type="submit"
+                                                value="@label.RawValue">
+
+                                            </button>
+                                        </form>
+

                                     @if (!string.IsNullOrEmpty(label.Link))
                                     {
-
+
+
+                                                Transaction details
+
+
                                     }
-                                    <form
-                                        asp-route-walletId="@this.Context.GetRouteValue("walletId")"
-                                        asp-action="ModifyTransaction"
-                                        method="post"
-                                        class="removeTransactionLabelForm">
-                                        <input type="hidden" name="transactionId" value="@transaction.Id"/>
-                                        <button
-                                            name="removelabel"
-                                            type="submit"
-                                            value="@label.RawValue">
-
-                                        </button>
-                                    </form>

                             }


Update for new file format

Update for new file format

--- Battery-Commander.Web/Services/BatchImportService.cs
+++ Battery-Commander.Web/Services/BatchImportService.cs
@@ -19,7 +19,18 @@

             using (var excel = new ExcelPackage(stream))
             {
-                // Upc Rank Name Sex PMos Dob Dor Ets
+                // 0 LastName
+                // 1 MiddleName
+                // 2 FirstName
+                // 3 Rank
+                // 4 DateOfBirth
+                // 5 ETSDate
+                // 6 DateOfRank
+                // 7 Gender
+                // 8 Unit
+                // 9 DODID
+                // 10 MilitaryEmail
+                // 11 EducationLevel

                 // Process Excel upload

@@ -43,26 +54,18 @@

                     // Parse into soldier

-                    var names = $"{sheet.Cells[row, 3].Value}".Split(' ');
-
-                    var middle = names.Count() > 2 ? names[2] : "";
-
-                    var ets = $"{sheet.Cells[row, 8].Value}" == "-" ? (DateTime?)null : Convert.ToDateTime(sheet.Cells[row, 8].Value);
-
-                    var dor = Convert.ToDateTime(sheet.Cells[row, 7].Value);
-
-                    var gender = $"{sheet.Cells[row, 4].Value}" == "M" ? Gender.Male : Gender.Female;
-
                     var parsed = new Soldier
                     {
-                        LastName = names[0],
-                        MiddleName = middle,
-                        FirstName = names[1],
-                        Rank = RankExtensions.Parse($"{sheet.Cells[row, 2].Value}"),
-                        DateOfBirth = Convert.ToDateTime(sheet.Cells[row, 6].Value),
-                        ETSDate = ets,
-                        DateOfRank = dor,
-                        Gender = gender,
+                        LastName = $"{sheet.Cells[row, 0].Value}",
+                        MiddleName = $"{sheet.Cells[row, 1].Value}",
+                        FirstName = $"{sheet.Cells[row, 2].Value}",
+                        Rank = RankExtensions.Parse($"{sheet.Cells[row, 3].Value}"),
+                        DateOfBirth = Convert.ToDateTime(sheet.Cells[row, 4].Value),
+                        ETSDate = Convert.ToDateTime(sheet.Cells[row, 5].Value),
+                        DateOfRank = Convert.ToDateTime(sheet.Cells[row, 6].Value),
+                        Gender = $"{sheet.Cells[row, 7].Value}" == "Male" ? Gender.Male : Gender.Female,
+                        DoDId = $"{sheet.Cells[row, 9]}",
+                        MilitaryEmail = $"{sheet.Cells[row, 10]}",
                         Unit = unit
                     };


update

update

--- CSharpGL/Renderers/BezierRenderers/BezierRenderer.cs
+++ CSharpGL/Renderers/BezierRenderers/BezierRenderer.cs
@@ -78,7 +78,19 @@
         /// <param name="arg"></param>
         protected override void DoRender(RenderEventArgs arg)
         {
-            this.Evaluator.Render(arg);
+            switch (arg.RenderMode)
+            {
+                case RenderModes.Render:
+                    this.Evaluator.Render(arg);
+                    break;
+
+                case RenderModes.ColorCodedPicking:
+                    // nothing to render.
+                    break;
+
+                default:
+                    throw new System.NotImplementedException();
+            }

             base.DoRender(arg);
         }


Strengthen to disable for whitespace quote markers

--- src/HearThis/UI/SentenceClauseSplitter.cs
+++ src/HearThis/UI/SentenceClauseSplitter.cs
@@ -51,10 +51,14 @@
 			_breakAtFirstLevelQuotes = breakAtFirstLevelQuotes && _firstLevelStartQuotationMark != null;
 			if (_breakAtFirstLevelQuotes)
 				Debug.Assert(_firstLevelEndQuotationMark != null);
-			if (string.IsNullOrEmpty(_firstLevelStartQuotationMark) || string.IsNullOrEmpty(_firstLevelEndQuotationMark))
+			if (string.IsNullOrWhiteSpace(_firstLevelStartQuotationMark) || string.IsNullOrWhiteSpace(_firstLevelEndQuotationMark))
 			{
-				// We can get into infinite loops if these are empty strings.
+				// We can get into infinite loops if these are empty strings. I'm not sure what might go wrong if we try to treat
+				// white space as quote markers, but Paratext at least does not allow it; I don't think we should try to either.
+				// So as defensive programming, if either of these isn't some real, non-white text, we won't try to support
+				// breaking at first level quotes.
 				_firstLevelEndQuotationMark = _firstLevelStartQuotationMark = null;
+				breakAtFirstLevelQuotes = false;
 			}
 		}


added HousesIds in UserDetailsResponseModel

--- AAWebSmartHouse/WebApi/AAWebSmartHouse.WebApi/Models/User/ResponseModels/UserDetailsResponseModel.cs
+++ AAWebSmartHouse/WebApi/AAWebSmartHouse.WebApi/Models/User/ResponseModels/UserDetailsResponseModel.cs
@@ -24,10 +24,15 @@

         public ICollection<string> RoleIds { get; set; }

+        public IEnumerable<int> HousesIds { get; set; }
+
         public void CreateMappings(IConfiguration config)
         {
             config.CreateMap<User, UserDetailsResponseModel>()
                 .ForMember(m => m.RoleIds, opts => opts.MapFrom(u => u.Roles.Select(ro => ro.RoleId)));
+
+            config.CreateMap<User, UserDetailsResponseModel>()
+                .ForMember(m => m.HousesIds, opts => opts.MapFrom(u => u.Houses.Select(ho => ho.HouseId)));
         }
     }
 }


Allowing scrolling for nested ListViews/ScrollViews when Snapping mode is enabled.

--- Cheesebaron.HorizontalListView/HorizontalListView.cs
+++ Cheesebaron.HorizontalListView/HorizontalListView.cs
@@ -88,6 +88,7 @@
         {
             InitView();
             _dataSetObserver = new DataObserver(this);
+            //Snap = true;
         }

         private void InitView()
@@ -338,12 +339,13 @@
                 left += childWidth + child.PaddingRight;
             }
         }
-
+
         public override bool DispatchTouchEvent(MotionEvent e)
         {
-            return (base.DispatchTouchEvent(e) | _gestureDetector.OnTouchEvent(e));
-        }
-
+            var handled = base.DispatchTouchEvent(e) | _gestureDetector.OnTouchEvent(e);
+            return Snap ? base.DispatchTouchEvent(e) : handled;
+        }
+
         public override bool OnTouchEvent(MotionEvent e)
         {
             if (Snap) // Oh snap!
@@ -496,16 +498,12 @@

             public override bool OnFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
             {
-                //Don't want fling in snap mode.
-                return !_horizontalListView.Snap && _horizontalListView.OnFling(e1, e2, velocityX, velocityY);
+                return _horizontalListView.OnFling(e1, e2, velocityX, velocityY);
             }

             public override bool OnScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)
             {
-                lock (_horizontalListView)
-                {
-                    _horizontalListView._nextX += (int)distanceX;
-                }
+                _horizontalListView._nextX += (int)distanceX;
                 _horizontalListView.RequestLayout();

                 return true;
@@ -516,16 +514,15 @@
                 for (var i = 0; i < _horizontalListView.ChildCount; i++)
                 {
                     var child = _horizontalListView.GetChildAt(i);
-                    if (IsEventWithinView(e, child))
-                    {
-                        if (null != _horizontalListView.OnItemClickListener)
-                            _horizontalListView.OnItemClickListener.OnItemClick(_horizontalListView, child, _horizontalListView._leftViewIndex + 1 + i,
-                                _horizontalListView.Adapter.GetItemId(_horizontalListView._leftViewIndex + 1 + i));
-                        if (null != _horizontalListView.OnItemSelectedListener)
-                            _horizontalListView.OnItemSelectedListener.OnItemSelected(_horizontalListView, child, _horizontalListView._leftViewIndex + 1 + i,
-                                _horizontalListView.Adapter.GetItemId(_horizontalListView._leftViewIndex + 1 + i));
-                        break;
-                    }
+
+                    if (!IsEventWithinView(e, child)) continue;
+                    if (null != _horizontalListView.OnItemClickListener)
+                        _horizontalListView.OnItemClickListener.OnItemClick(_horizontalListView, child, _horizontalListView._leftViewIndex + 1 + i,
+                                                                            _horizontalListView.Adapter.GetItemId(_horizontalListView._leftViewIndex + 1 + i));
+                    if (null != _horizontalListView.OnItemSelectedListener)
+                        _horizontalListView.OnItemSelectedListener.OnItemSelected(_horizontalListView, child, _horizontalListView._leftViewIndex + 1 + i,
+                                                                                _horizontalListView.Adapter.GetItemId(_horizontalListView._leftViewIndex + 1 + i));
+                    break;
                 }

                 return true;
@@ -537,13 +534,11 @@
                 {
                     var child = _horizontalListView.GetChildAt(i);

-                    if (IsEventWithinView(e, child))
-                    {
-                        if (null != _horizontalListView.OnItemLongClickListener)
-                            _horizontalListView.OnItemLongClickListener.OnItemLongClick(_horizontalListView, child, _horizontalListView._leftViewIndex + 1 + i,
-                                _horizontalListView.Adapter.GetItemId(_horizontalListView._leftViewIndex + 1 + i));
-                        break;
-                    }
+                    if (!IsEventWithinView(e, child)) continue;
+                    if (null != _horizontalListView.OnItemLongClickListener)
+                        _horizontalListView.OnItemLongClickListener.OnItemLongClick(_horizontalListView, child, _horizontalListView._leftViewIndex + 1 + i,
+                                                                                _horizontalListView.Adapter.GetItemId(_horizontalListView._leftViewIndex + 1 + i));
+                    break;
                 }
             }


Fix vessel revert

Fix vessel revert

--- Client/Systems/VesselRemoveSys/VesselRemoveEvents.cs
+++ Client/Systems/VesselRemoveSys/VesselRemoveEvents.cs
@@ -27,12 +27,20 @@
                 var reason = dyingVessel.id == _recoveringTerminatingVesselId ? "Recovered/Terminated" : "Destroyed";
                 LunaLog.Log($"[LMP]: Removing vessel {dyingVessel.id}, Name: {dyingVessel.vesselName} from the server: {reason}");

-                //Add to the kill list so it's also removed from the store later on!
-                System.AddToKillList(dyingVessel.id, "OnVesselWillDestroy - " + reason);
-
-                //If we are killing our own vessel there's the possibility that the player hits "revert" so in this case DO NOT keep it in the remove list
-                System.MessageSender.SendVesselRemove(dyingVessel.id, !ownVesselDying);
-
+                if (!ownVesselDying)
+                {
+                    //Add to the kill list so it's also removed from the store later on!
+                    System.AddToKillList(dyingVessel.id, "OnVesselWillDestroy - " + reason);
+                    System.MessageSender.SendVesselRemove(dyingVessel.id);
+                }
+                else
+                {
+                    //We do not add our OWN vessel to the kill list as then if we revert we won't be able to send the vessel proto again
+                    //As the "VesselWillBeKilled" method will return true.
+                    //For this reason we also tell the other players to NOT keep it in the remove list
+                    System.MessageSender.SendVesselRemove(dyingVessel.id, false);
+                }
+
                 //Vessel is dead so remove the locks after 1500ms to get the debris locks if any
                 LockSystem.Singleton.ReleaseAllVesselLocks(dyingVessel.GetVesselCrew().Select(c => c.name), dyingVessel.id, 1500);
             }


Simplify

Simplify

--- agg/VertexSource/ApplyTransform.cs
+++ agg/VertexSource/ApplyTransform.cs
@@ -59,15 +59,11 @@

 		public ITransform Transform
 		{
-			get { return transformToApply; }
-			set { transformToApply = value; }
+			get => transformToApply;
+			set => transformToApply = value;
 		}

-		public IVertexSource VertexSource
-		{
-			get;
-			set;
-		}
+		public IVertexSource VertexSource { get; set; }

 		public VertexSourceApplyTransform()
 		{
@@ -94,12 +90,14 @@
 			foreach (VertexData vertexData in VertexSource.Vertices())
 			{
 				VertexData transformedVertex = vertexData;
+
 				if (ShapePath.is_vertex(transformedVertex.command))
 				{
 					var position = transformedVertex.position;
 					transformToApply.transform(ref position.X, ref position.Y);
 					transformedVertex.position = position;
 				}
+
 				yield return transformedVertex;
 			}
 		}
@@ -112,10 +110,12 @@
 		public ShapePath.FlagsAndCommand vertex(out double x, out double y)
 		{
 			ShapePath.FlagsAndCommand cmd = VertexSource.vertex(out x, out y);
+
 			if (ShapePath.is_vertex(cmd))
 			{
 				transformToApply.transform(ref x, ref y);
 			}
+
 			return cmd;
 		}


Remove unused methods an small refactors

--- src/IniFileParser/Parser/IniDataParser.cs
+++ src/IniFileParser/Parser/IniDataParser.cs
@@ -168,72 +168,7 @@
         // See IniParserConfiguration interface, and IniDataParser constructor
         // to change the default configuration.

-        /// <summary>
-        ///     Checks if a given string contains a comment.
-        /// </summary>
-        /// <param name="line">
-        ///     String with a line to be checked.
-        /// </param>
-        /// <returns>
-        ///     true if any substring from s is a comment,
-        ///     false otherwise.
-        /// </returns>
-        protected virtual bool LineContainsAComment(string line)
-        {
-            return !string.IsNullOrEmpty(line)
-                   && Scheme.CommentRegex.Match(line).Success;
-        }
-
-        /// <summary>
-        ///     Checks if a given string represents a section delimiter.
-        /// </summary>
-        /// <param name="line">
-        ///     The string to be checked.
-        /// </param>
-        /// <returns>
-        ///     true if the string represents a section,
-        ///     false otherwise.
-        /// </returns>
-        protected virtual bool LineMatchesASection(string line)
-        {
-            return !string.IsNullOrEmpty(line)
-                   && Scheme.SectionRegex.Match(line).Success;
-        }
-
-        /// <summary>
-        ///     Checks if a given string represents a key / value pair.
-        /// </summary>
-        /// <param name="line">
-        ///     The string to be checked.
-        /// </param>
-        /// <returns>
-        ///     true if the string represents a key / value pair,
-        ///     false otherwise.
-        /// </returns>
-        protected virtual bool LineMatchesAKeyValuePair(string line)
-        {
-            return !string.IsNullOrEmpty(line)
-                   && line.Contains(Scheme.KeyValueAssigmentString);
-        }
-
-        /// <summary>
-        ///     Removes a comment from a string if exist, and returns the string without
-        ///     the comment substring.
-        /// </summary>
-        /// <param name="line">
-        ///     The string we want to remove the comments from.
-        /// </param>
-        /// <returns>
-        ///     The string s without comments.
-        /// </returns>
-        protected virtual string ExtractComment(string line)
-        {
-            string comment = Scheme.CommentRegex.Match(line).Value.Trim();
-
-            _currentCommentListTemp.Add(comment.Substring(1, comment.Length - 1));
-
-            return line.Replace(comment, "").Trim();
-        }
+

         /// <summary>
         ///     Processes one line and parses the data found in that line
@@ -267,7 +202,7 @@
                                        currentLine.DiscardChanges().ToString());
         }

-        protected bool ProcessComment(StringBuffer currentLine)
+        protected virtual bool ProcessComment(StringBuffer currentLine)
         {
             // Line is  med when it came here, so we only need to check if
             // the first characters are those of the comments
@@ -369,14 +304,13 @@
         {
             if (currentLine.Count <= 0) return false;

-            var propertyDelimiterPos = currentLine.FindSubstring(Scheme.PropertyDelimiterString);
-
-            if (propertyDelimiterPos.IsEmpty) return false;
-
-
-            var keyRange = Range.WithIndexes(0, propertyDelimiterPos.start - 1);
-            var valueStartIdx = propertyDelimiterPos.end + 1;
-            var valueSize = currentLine.Count - propertyDelimiterPos.end - 1;
+            var propertyAssignmentStringPos = currentLine.FindSubstring(Scheme.PropertyAssigmentString);
+
+            if (propertyAssignmentStringPos.IsEmpty) return false;
+
+            var keyRange = Range.WithIndexes(0, propertyAssignmentStringPos.start - 1);
+            var valueStartIdx = propertyAssignmentStringPos.end + 1;
+            var valueSize = currentLine.Count - propertyAssignmentStringPos.end - 1;
             var valueRange = Range.FromIndexWithSize(valueStartIdx, valueSize);

             var key = currentLine.Substring(keyRange);
@@ -505,8 +439,6 @@
         #endregion

         #region Fields
-
-
         uint _currentLineNumber;

         // Holds a list of the exceptions catched while parsing


Update JessicaHttpHandler to handle array values in the Form and QueryString collections

--- src/Jessica/Routing/JessicaHttpHandler.cs
+++ src/Jessica/Routing/JessicaHttpHandler.cs
@@ -86,12 +86,36 @@

             foreach (string key in context.Request.Form)
             {
-                parameters.Add(key, context.Request.Form[key]);
+                if (key.Contains("[]"))
+                {
+                    var values = context.Request.Form.GetValues(key);
+
+                    if (values != null)
+                    {
+                        parameters.Add(key.Replace("[]", ""), values);
+                    }
+                }
+                else
+                {
+                    parameters.Add(key, context.Request.Form[key]);
+                }
             }

             foreach (string key in context.Request.QueryString)
             {
-                parameters.Add(key, context.Request.QueryString[key]);
+                if (key.Contains("[]"))
+                {
+                    var values = context.Request.QueryString.GetValues(key);
+
+                    if (values != null)
+                    {
+                        parameters.Add(key.Replace("[]", ""), values);
+                    }
+                }
+                else
+                {
+                    parameters.Add(key, context.Request.QueryString[key]);
+                }
             }

             foreach (var item in _requestContext.RouteData.Values)


Enable SA1137 by default

Enable SA1137 by default

--- StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1137ElementsShouldHaveTheSameIndentation.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers/ReadabilityRules/SA1137ElementsShouldHaveTheSameIndentation.cs
@@ -27,7 +27,7 @@
         private static readonly string HelpLink = "https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1137.md";

         private static readonly DiagnosticDescriptor Descriptor =
-            new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.ReadabilityRules, DiagnosticSeverity.Warning, AnalyzerConstants.DisabledNoTests, Description, HelpLink);
+            new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, AnalyzerCategory.ReadabilityRules, DiagnosticSeverity.Warning, AnalyzerConstants.EnabledByDefault, Description, HelpLink);

         private static readonly Action<CompilationStartAnalysisContext> CompilationStartAction = HandleCompilationStart;
         private static readonly Action<SyntaxNodeAnalysisContext> CompilationUnitAction = HandleCompilationUnit;


Sending mail successfully

Sending mail successfully

--- CodeRuse.Email.Client/Controllers/EmailController.cs
+++ CodeRuse.Email.Client/Controllers/EmailController.cs
@@ -20,27 +20,6 @@
         {
         }

-        private static string Rot13(string input)
-        {
-            StringBuilder result = new StringBuilder();
-            Regex regex = new Regex("[A-Za-z]");
-
-            foreach (char c in input)
-            {
-                if (regex.IsMatch(c.ToString()))
-                {
-                    int charCode = ((c & 223) - 52) % 26 + (c & 32) + 65;
-                    result.Append((char)charCode);
-                }
-                else
-                {
-                    result.Append(c);
-                }
-            }
-
-            return result.ToString();
-        }
-
         /// <summary>
         /// Send email, by calling this api from clients
         /// </summary>
@@ -53,12 +32,11 @@
             {
                 Chilkat.MailMan mailMan = new Chilkat.MailMan()
                 {
-                    SmtpHost = "smtp.google.com",
+                    SmtpHost = "",
                     SmtpPort = 465,
                     SmtpSsl = true,
                     SmtpUsername = "",
-                    SmtpPassword = "",
-                    SmtpAuthMethod = "LOGIN"
+                    SmtpPassword = @""
                 };

                 bool success = mailMan.UnlockComponent("30-day trial");
@@ -83,17 +61,19 @@
                         if (!string.IsNullOrEmpty(attr.Name) && attr.Name.ToLower() == "src" &&
                             attr.Value.IndexOf("data:") == 0)
                         {
-                            //var srcValue = attr.Value;
-                            attr.Value = "base.jpg";
+                            File.WriteAllBytes(@"<path>\myCurrentFile.jpg", Convert.FromBase64String(attr.Value.Substring(attr.Value.IndexOf(',') + 1)));
+                            string contentId = eml.AddRelatedFile(@"<path>\myCurrentFile.jpg");
+                            if (eml.LastMethodSuccess != true)
+                            {
+                                Console.WriteLine(eml.LastErrorText);
+                                throw new Exception("Couldn't get the content id...");
+                            }
+                            attr.Value = string.Format("cid:{0}", contentId);
                         }
                     }
                 }
-                //MemoryStream stream = new MemoryStream();
-                var alteredHtml = resultant.ToString();
-                //StreamReader reader = new StreamReader(stream);
-                //alteredHtml = reader.ReadToEnd();
-
-                eml.SetHtmlBody(email.Body);
+
+                eml.SetHtmlBody(resultant.DocumentNode.InnerHtml);
                 if (string.IsNullOrEmpty(email.ToAddresses)) {
                     throw new Exception("Specify to addresses...");
                 }
@@ -108,9 +88,15 @@
                     }
                 }
                 success = mailMan.SendEmail(eml);
-                if (success != true)
+                if (!success)
                 {
-                    throw new Exception("Could not send the mail...");
+                    throw new Exception("Could not send the mail due to " + mailMan.LastErrorText);
+                }
+
+                success = mailMan.CloseSmtpConnection();
+                if (!success)
+                {
+                    throw new Exception("Connection to SMTP server not closed cleanly.");
                 }
                 else
                 {


added edge case specs

added edge case specs

--- Tests.Unit.Core.ApplicationServices/ApplicationServices/SystemUsage/ItSystemUsageWriteServiceTest.cs
+++ Tests.Unit.Core.ApplicationServices/ApplicationServices/SystemUsage/ItSystemUsageWriteServiceTest.cs
@@ -188,9 +188,6 @@
                 }
             };
             var projectUuids = Many<Guid>().ToList();
-            foreach (var projectUuid in projectUuids)
-                ExpectGetProjectReturns(projectUuid, CreateItProject(organization, projectUuid));
-
             var dataClassificationId = A<Guid>();
             var itSystemCategories = new ItSystemCategories { Id = A<int>(), Uuid = dataClassificationId };
             var input = new SystemUsageUpdateParameters
@@ -217,6 +214,8 @@
             ExpectAllowModifyReturns(itSystemUsage, true);
             ExpectGetItSystemCategoryReturns(itSystemUsage.OrganizationId, dataClassificationId, (itSystemCategories, true));
             ExpectGetContractReturns(newContractId, newContract);
+            foreach (var projectUuid in projectUuids)
+                ExpectGetProjectReturns(projectUuid, CreateItProject(organization, projectUuid));

             //Act
             var createResult = _sut.Create(new SystemUsageCreationParameters(systemUuid, organizationUuid, input));
@@ -245,6 +244,12 @@
             throw new NotImplementedException();
         }

+        [Fact]
+        public void Can_Create_With_GeneralData_WithoutDefinedChanges_Leaves_Properties_Untouched()
+        {
+            throw new NotImplementedException();
+        }
+
         //TODO: Simulate optional properties as well (if not set to maybe.some(change) it will remain untouched!)

         private void ExpectGetProjectReturns(Guid projectUuid, Result<ItProject, OperationError> result)


Sending the image files with threads

Sending the image files with threads

--- CodeRuse.Email.Client/Controllers/EmailController.cs
+++ CodeRuse.Email.Client/Controllers/EmailController.cs
@@ -28,29 +28,33 @@
         [HttpPost]
         public async Task<IHttpActionResult> Send(EmailModels email)
         {
+            List<string> filePaths = new List<string>();
             try
             {
                 Chilkat.MailMan mailMan = new Chilkat.MailMan()
                 {
-                    SmtpHost = "",
+                    SmtpHost = "smtp.gmail.com",
                     SmtpPort = 465,
                     SmtpSsl = true,
                     SmtpUsername = "",
                     SmtpPassword = @""
                 };
-
+
                 bool success = mailMan.UnlockComponent("30-day trial");
                 if (success != true)
                 {
                     throw new Exception("30 day trial is not available...");
                 }
-                Chilkat.Email eml = new Chilkat.Email() {
+                Chilkat.Email msg = new Chilkat.Email()
+                {
                     From = email.From,
                     Subject = email.Subject
                 };
                 var source = WebUtility.HtmlDecode(email.Body);
                 HtmlDocument resultant = new HtmlDocument();
                 resultant.LoadHtml(source);
+
+                List<Task> tasks = new List<Task>();

                 List<HtmlNode> images = resultant.DocumentNode.Descendants().Where(x => x.Name == "img").ToList();

@@ -61,33 +65,54 @@
                         if (!string.IsNullOrEmpty(attr.Name) && attr.Name.ToLower() == "src" &&
                             attr.Value.IndexOf("data:") == 0)
                         {
-                            File.WriteAllBytes(@"<path>\myCurrentFile.jpg", Convert.FromBase64String(attr.Value.Substring(attr.Value.IndexOf(',') + 1)));
-                            string contentId = eml.AddRelatedFile(@"<path>\myCurrentFile.jpg");
-                            if (eml.LastMethodSuccess != true)
+                            tasks.Add(Task.Factory.StartNew(() =>
                             {
-                                Console.WriteLine(eml.LastErrorText);
-                                throw new Exception("Couldn't get the content id...");
-                            }
-                            attr.Value = string.Format("cid:{0}", contentId);
+                                string filePath = string.Empty;
+                                try
+                                {
+                                    filePath = System.IO.Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "inline-images", string.Format("img_{0}_{1}.{2}",
+                                        System.Guid.NewGuid(), DateTime.UtcNow.ToString("yyyy-MM-dd_HH-mm-ss"),
+                                        attr.Value.Substring(attr.Value.IndexOf('/') + 1, attr.Value.IndexOf(';') - attr.Value.IndexOf('/') - 1)));
+                                    File.WriteAllBytes(filePath, Convert.FromBase64String(attr.Value.Substring(attr.Value.IndexOf(',') + 1)));
+                                    filePaths.Add(filePath);
+
+                                    // Embed the file into mail body
+                                    string contentId = msg.AddRelatedFile(filePath);
+                                    if (msg.LastMethodSuccess != true)
+                                    {
+                                        Console.WriteLine(msg.LastErrorText);
+                                        throw new Exception("Couldn't get the content id...");
+                                    }
+                                    attr.Value = string.Format("cid:{0}", contentId);
+                                }
+                                catch (Exception e)
+                                {
+                                    throw new Exception("Couldn't write the image file: " + e.Message);
+                                }
+                            }));
                         }
                     }
                 }
-
-                eml.SetHtmlBody(resultant.DocumentNode.InnerHtml);
-                if (string.IsNullOrEmpty(email.ToAddresses)) {
+
+                Task.WaitAll(tasks.ToArray());
+
+                msg.SetHtmlBody(resultant.DocumentNode.InnerHtml);
+                if (string.IsNullOrEmpty(email.ToAddresses))
+                {
                     throw new Exception("Specify to addresses...");
                 }
-                foreach (var toAddress in email.ToAddresses.Split(';')) {
-                    eml.AddTo("Test", toAddress);
+                foreach (var toAddress in email.ToAddresses.Split(';'))
+                {
+                    msg.AddTo("Test", toAddress);
                 }
                 if (!string.IsNullOrEmpty(email.CcAddresses))
                 {
                     foreach (var toAddress in email.CcAddresses.Split(';'))
                     {
-                        eml.AddCC("Test", toAddress);
+                        msg.AddCC("Test", toAddress);
                     }
                 }
-                success = mailMan.SendEmail(eml);
+                success = mailMan.SendEmail(msg);
                 if (!success)
                 {
                     throw new Exception("Could not send the mail due to " + mailMan.LastErrorText);
@@ -112,6 +137,26 @@
             {
                 return BadRequest(ex.Message);
             }
+            finally
+            {
+                if (filePaths.Count > 0)
+                {
+                    foreach (var filePath in filePaths)
+                    {
+                        try
+                        {
+                            if (File.Exists(filePath))
+                            {
+                                File.Delete(filePath);
+                            }
+                        }
+                        catch (Exception e)
+                        {
+
+                        }
+                    }
+                }
+            }
         }
     }
 }


Source of issue #14 found.  Interfaces implementing interfaces.

--- tests/Compose.Tests/EmissionTests.cs
+++ tests/Compose.Tests/EmissionTests.cs
@@ -438,26 +438,22 @@
 		#endregion

 		#region CanInvokeInheritedInterfaceMethods
-		public interface IInvokeGenericAsArray<T> : IObservable<T>
-		{
-			void Method(T arg);
-		}
-		private class InvokeGenericAsArray : IInvokeGenericAsArray<byte[]>
-		{
-			public void Method(byte[] arg) { }
-
-			public IDisposable Subscribe(IObserver<byte[]> observer)
-			{
-				throw new NotImplementedException();
-			}
+		public interface INestedInterface { void NestedMethod(); }
+		public interface IParentInterface : INestedInterface { void ParentMethod(); }
+		private class InvokeInheritedInterfaceMethods : IParentInterface
+		{
+			public void NestedMethod() { }
+
+			public void ParentMethod() { }
 		}
         [Fact]
-		public void CanInvokeGenericAsArray()
-		{
-			var app = new Fake.Application();
-			app.UseServices(services => services.AddTransient<IInvokeGenericAsArray<byte[]>, InvokeGenericAsArray>());
-			var service = app.CreateProxy<IInvokeGenericAsArray<byte[]>>();
-			service.Method(new byte[0]);
+		public void CanInvokeInheritedInterfaceMethods()
+		{
+			var app = new Fake.Application();
+			app.UseServices(services => services.AddTransient<IParentInterface, InvokeInheritedInterfaceMethods>());
+			var service = app.CreateProxy<IParentInterface>();
+			service.ParentMethod();
+			service.NestedMethod();
 		}
 		#endregion


Lucene.Net.Replicator.SessionToken: Fixed constructor to accept IDataInput instead of DataInputStream

--- src/Lucene.Net.Replicator/SessionToken.cs
+++ src/Lucene.Net.Replicator/SessionToken.cs
@@ -54,7 +54,7 @@
         /// Constructor which deserializes from the given <see cref="IDataInput"/>.
         /// </summary>
         /// <exception cref="System.IO.IOException"></exception>
-        public SessionToken(DataInputStream reader) // LUCENENET TODO: API : IDataInput
+        public SessionToken(IDataInput reader)
         {
             Id = reader.ReadUTF();
             Version = reader.ReadUTF();


bugfix: nullable value type required

bugfix: nullable value type required

--- src/Mictlanix.C2Sharp/C2RejectedSignal.cs
+++ src/Mictlanix.C2Sharp/C2RejectedSignal.cs
@@ -49,7 +49,7 @@
 		public C2SymbolType TypeOfSymbol { get; set; }

 		[JsonProperty ("limit")]
-		public decimal Limit { get; set; }
+		public decimal? Limit { get; set; }

 		[JsonProperty ("profittarget")]
 		public decimal? ProfitTarget { get; set; }


Garantindo criar produto

Garantindo criar produto

--- tests/Unit/ProductControllerTests.cs
+++ tests/Unit/ProductControllerTests.cs
@@ -79,5 +79,18 @@

             productDataMock.Verify(x => x.AddProduct(It.IsAny<Product>()), Times.Once);
         }
+
+        [TestMethod]
+        public async Task Given_A_Valid_Product_When_Creating_Product_Then_Call_Add_ProductHistoryRepo()
+        {
+            //Terminar de escrever esse teste
+            var productDataMock = new Mock<IProductContext>();
+            var productService = new ProductApplicationService(productDataMock.Object);
+            var sut = new ProductController(productService);
+
+            var result = await sut.Post(new ProductVm{Name = "Teste", Price = 10});
+
+            productDataMock.Verify(x => x.AddProductHistory(It.IsAny<ProductHistory>()), Times.Once);
+        }
     }
 }


SF GetMeta and Append

SF GetMeta and Append

--- src/src/Storage.Net.Microsoft.ServiceFabric/Blob/ServiceFabricReliableDictionaryBlobStorage.cs
+++ src/src/Storage.Net.Microsoft.ServiceFabric/Blob/ServiceFabricReliableDictionaryBlobStorage.cs
@@ -20,9 +20,27 @@
          _collectionName = collectionName ?? throw new ArgumentNullException(nameof(collectionName));
       }

-      public override Task AppendFromStreamAsync(string id, Stream chunkStream)
+      public override async Task AppendFromStreamAsync(string id, Stream chunkStream)
       {
-         return base.AppendFromStreamAsync(id, chunkStream);
+         using (var tx = await OpenCollection())
+         {
+            //create a new byte array with
+            byte[] extra = chunkStream.ToByteArray();
+            ConditionalValue<byte[]> value = await tx.Collection.TryGetValueAsync(tx.Tx, id);
+            int oldLength = value.HasValue ? value.Value.Length : 0;
+            byte[] newData = new byte[oldLength + extra.Length];
+            if(value.HasValue)
+            {
+               Array.Copy(value.Value, newData, oldLength);
+            }
+            Array.Copy(extra, 0, newData, oldLength, extra.Length);
+
+            //put new array into the key
+            await tx.Collection.AddOrUpdateAsync(tx.Tx, id, extra, (k, v) => extra);
+
+            //commit the transaction
+            await tx.CommitAsync();
+         }
       }

       public override async Task DeleteAsync(string id)
@@ -58,9 +76,16 @@
          }
       }

-      public override Task<BlobMeta> GetMetaAsync(string id)
+      public override async Task<BlobMeta> GetMetaAsync(string id)
       {
-         return base.GetMetaAsync(id);
+         using (var tx = await OpenCollection())
+         {
+            ConditionalValue<byte[]> value = await tx.Collection.TryGetValueAsync(tx.Tx, id);
+
+            if (!value.HasValue) return null;
+
+            return new BlobMeta(value.Value.Length, null);
+         }
       }

       public override async Task<IEnumerable<string>> ListAsync(string prefix)


Updated test files to react to aspnet/Razor#260.

--- test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles/Output/Runtime/ModelExpressionTagHelper.cs
+++ test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles/Output/Runtime/ModelExpressionTagHelper.cs
@@ -18,7 +18,9 @@
     >
     {
         #line hidden
+        #pragma warning disable 0414
         private System.IO.TextWriter __tagHelperStringValueBuffer = null;
+        #pragma warning restore 0414
         private Microsoft.AspNet.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext = null;
         private Microsoft.AspNet.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = new Microsoft.AspNet.Razor.Runtime.TagHelpers.TagHelperRunner();
         private Microsoft.AspNet.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager = new Microsoft.AspNet.Razor.Runtime.TagHelpers.TagHelperScopeManager();


More precise test on multi report parsing

--- src/NVika.Tests/ParseReportCommandTest.cs
+++ src/NVika.Tests/ParseReportCommandTest.cs
@@ -299,6 +299,10 @@
             {
                 if (alternate)
                 {
+                    if (issuesContainError && _mockParser_Alternate)
+                    {
+                        issuesContainError = false;
+                    }
                     _mockParser_Alternate = !_mockParser_Alternate;
                     if (_mockParser_Alternate)
                     {


Removed old FakeRootPathProvider

Removed old FakeRootPathProvider

--- src/Nancy.Testing/FakeRootPathProvider.cs
+++ src/Nancy.Testing/FakeRootPathProvider.cs
@@ -1,19 +0,0 @@
-namespace Nancy.Testing
-{
-    /// <summary>
-    /// Fake root path provider - set the static RootPath property
-    /// </summary>
-    public class FakeRootPathProvider : IRootPathProvider
-    {
-        public static string RootPath { get; set; }
-
-        /// <summary>
-        /// Returns the root folder path of the current Nancy application.
-        /// </summary>
-        /// <returns>A <see cref="string"/> containing the path of the root folder.</returns>
-        string IRootPathProvider.GetRootPath()
-        {
-            return RootPath;
-        }
-    }
-}


#149 removed unused usings

#149 removed unused usings

--- src/Rocks.Tests/RockMakeGeneratorTests.cs
+++ src/Rocks.Tests/RockMakeGeneratorTests.cs
@@ -1,10 +1,8 @@
 using Microsoft.CodeAnalysis;
-using Microsoft.CodeAnalysis.CSharp;
 using Microsoft.CodeAnalysis.Testing;
 using NUnit.Framework;
 using Rocks.Diagnostics;
 using System;
-using System.Collections.Immutable;
 using System.Linq;
 using System.Threading.Tasks;


git-svn-id: https://jumony.svn.codeplex.com/svn/trunk@82449 2327b42d-5241-43d6-9e2a-de5ac946f064

--- Ivony.Html.Web/ClientCachePolicy.cs
+++ Ivony.Html.Web/ClientCachePolicy.cs
@@ -37,7 +37,7 @@
     {
       var response = _context.Response;

-
+
     }

@@ -140,7 +140,7 @@
     /// </summary>
     public void ResetCacheControl()
     {
-
+
     }

@@ -148,8 +148,8 @@
     /// 重置 Last-Modified、ETag 等设置
     /// </summary>
     public void ResetEntitySettings()
-    {
-
+    {
+
     }

@@ -160,8 +160,6 @@
     {
       get;
       set;
-      ]
-
-
+    }
   }
 }


test enums in TypeConverter

test enums in TypeConverter

--- JilTests/DeserializeDynamicTests.cs
+++ JilTests/DeserializeDynamicTests.cs
@@ -2278,6 +2278,14 @@
         [TestMethod]
         public void DynamicTypeConverter()
         {
+            // enums
+            {
+                var dyn = JSON.DeserializeDynamic("\"Hello\"");
+                System.ComponentModel.TypeConverter tc = System.ComponentModel.TypeDescriptor.GetConverter(dyn);
+                Assert.IsTrue(tc.CanConvertTo(typeof(_DynamicTypeConverter)));
+                Assert.AreEqual(_DynamicTypeConverter.Hello, (_DynamicTypeConverter)tc.ConvertTo(dyn, typeof(_DynamicTypeConverter)));
+            }
+
             // ints
             {
                 var dyn = JSON.DeserializeDynamic("123");


Property selection bug fix

Property selection bug fix

--- LH.TestObjects/PropertySelection.cs
+++ LH.TestObjects/PropertySelection.cs
@@ -60,7 +60,7 @@
         {
             foreach (var propertyName in propertyNames)
             {
-                if (propertyPath.IsRoot || propertyPath.PropertyInfo.Name != propertyName)
+                if (propertyPath.IsRoot || propertyPath.PropertyInfo == null || propertyPath.PropertyInfo.Name != propertyName)
                 {
                     return false;
                 }


chg UWP test program to check return code from win32_set_directory calls

--- test_nupkgs/device/UWP/Program.cs
+++ test_nupkgs/device/UWP/Program.cs
@@ -14,9 +14,18 @@
         static int Main()
         {
             SQLitePCL.Batteries_V2.Init();
-            SQLitePCL.raw.sqlite3_win32_set_directory(/*data directory type*/1, Windows.Storage.ApplicationData.Current.LocalFolder.Path);
-            SQLitePCL.raw.sqlite3_win32_set_directory(/*temp directory type*/2, Windows.Storage.ApplicationData.Current.TemporaryFolder.Path);
-            var rc = Xunit.Run.AllTestsInCurrentAssembly();
+            int rc;
+            rc = SQLitePCL.raw.sqlite3_win32_set_directory(/*data directory type*/1, Windows.Storage.ApplicationData.Current.LocalFolder.Path);
+            if (rc != SQLitePCL.raw.SQLITE_OK)
+            {
+                throw new Exception($"ERROR on SET_DIRECTORY 1: {rc}");
+            }
+            rc = SQLitePCL.raw.sqlite3_win32_set_directory(/*temp directory type*/2, Windows.Storage.ApplicationData.Current.TemporaryFolder.Path);
+            if (rc != SQLitePCL.raw.SQLITE_OK)
+            {
+                throw new Exception($"ERROR on SET_DIRECTORY 2: {rc}");
+            }
+            Xunit.Run.AllTestsInCurrentAssembly();
             Console.ReadLine();
             return rc;
         }


Add reading file from IsolatedStorage functionality for Windows Phone

--- src/ServiceStack.Text/StringExtensions.cs
+++ src/ServiceStack.Text/StringExtensions.cs
@@ -11,13 +11,17 @@
 //

 using System;
-using System.Collections.Generic;
+using System.Globalization;
 using System.IO;
-using System.Linq;
 using System.Text;
-using System.Globalization;
 using System.Text.RegularExpressions;
 using ServiceStack.Text.Support;
+using System.Collections.Generic;
+#if WINDOWS_PHONE
+using System.IO.IsolatedStorage;
+using ServiceStack.Text.WP;
+
+#endif

 namespace ServiceStack.Text
 {
@@ -438,6 +442,15 @@
 			{
 				return new StreamReader( fileStream ).ReadToEnd( ) ;
 			}
+
+#elif WINDOWS_PHONE
+            using (var isoStore = IsolatedStorageFile.GetUserStoreForApplication())
+            {
+                using (var fileStream = isoStore.OpenFile(filePath, FileMode.Open))
+                {
+                    return new StreamReader(fileStream).ReadToEnd();
+                }
+            }
 #else
             return File.ReadAllText(filePath);
 #endif


Ignore exceptions from template compilation on background threads. Fixes #546

--- src/ServiceStack/Html/TemplateProvider.cs
+++ src/ServiceStack/Html/TemplateProvider.cs
@@ -88,7 +88,7 @@
                 Log.InfoFormat("Starting {0} threads..", threadsToRun);

                 threadsToRun.Times(x => {
-                    ThreadPool.QueueUserWorkItem(waitHandle => CompileAllPages());
+                    ThreadPool.QueueUserWorkItem(waitHandle => { try { CompileAllPages(); } catch { } });
                 });
             }
             else


Small changes in AssemblyInfo

Small changes in AssemblyInfo

--- src/Sharpility/Properties/AssemblyInfo.cs
+++ src/Sharpility/Properties/AssemblyInfo.cs
@@ -6,11 +6,11 @@
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("Sharpility")]
-[assembly: AssemblyDescription("C# commons")]
+[assembly: AssemblyDescription(".Net commons and extensions.")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("FinderSystems")]
 [assembly: AssemblyProduct("Sharpility")]
-[assembly: AssemblyCopyright("Copyright ©  2015")]
+[assembly: AssemblyCopyright("Copyright © FinderSystems 2016")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]


fixes changing the underscore of a user language to culture.

--- src/Umbraco.Core/Models/UserExtensions.cs
+++ src/Umbraco.Core/Models/UserExtensions.cs
@@ -26,7 +26,7 @@
         {
             try
             {
-                var culture = CultureInfo.GetCultureInfo(userLanguage);
+                var culture = CultureInfo.GetCultureInfo(userLanguage.Replace("_", "-"));
                 //TODO: This is a hack because we store the user language as 2 chars instead of the full culture
                 // which is actually stored in the language files (which are also named with 2 chars!) so we need to attempt
                 // to convert to a supported full culture


Completed unit 2

Completed unit 2

--- src/Unit-2/DoThis/Actors/ChartingActor.cs
+++ src/Unit-2/DoThis/Actors/ChartingActor.cs
@@ -7,7 +7,7 @@

 namespace ChartApp.Actors
 {
-    public class ChartingActor : ReceiveActor
+    public class ChartingActor : ReceiveActor, IWithUnboundedStash
     {
         #region Messages

@@ -59,6 +59,11 @@
         private Dictionary<string, Series> _seriesIndex;
         private readonly Button _pauseButton;

+        public IStash Stash
+        {
+            get; set;
+        }
+
         public ChartingActor(Chart chart, Button pauseButton) : this(chart, new Dictionary<string, Series>(), pauseButton)
         {
         }
@@ -93,7 +98,13 @@
             {
                 SetPauseButtonText(false);
                 UnbecomeStacked();
+                // ChartingActor is leaving the Paused state, put messages back
+                // into mailbox for processing under new behavior
+                Stash.UnstashAll();
             });
+
+            Receive<AddSeries>(addSeries => { Stash.Stash(); });
+            Receive<RemoveSeries>(removeSeries => { Stash.Stash(); } );
         }

         #region Individual Message Type Handlers


Disable PropertyOverridesContainSemicolon only on netcore

This was disabled to work around #259, but should always run on desktop.

--- src/XMakeTasks/UnitTests/MSBuild_Tests.cs
+++ src/XMakeTasks/UnitTests/MSBuild_Tests.cs
@@ -324,7 +324,11 @@
         /// However, it's a situation where the project author doesn't have control over the
         /// property value and so he can't escape it himself.
         /// </summary>
+#if RUNTIME_TYPE_NETCORE
         [Fact(Skip = "https://github.com/Microsoft/msbuild/issues/259")]
+#else
+        [Fact]
+#endif
         public void PropertyOverridesContainSemicolon()
         {
             ObjectModelHelpers.DeleteTempProjectDirectory();


Fix: remove duplicate types in WSDL document.

--- src/XRoadLib/ServiceDescriptionBuilder.cs
+++ src/XRoadLib/ServiceDescriptionBuilder.cs
@@ -202,6 +202,8 @@

         private IEnumerable<XmlSchema> BuildSchemas(string targetNamespace, MessageCollection messages)
         {
+            var builtTypes = new HashSet<XName>();
+
             var schemaTypes = new List<Tuple<string, XmlSchemaType>>();
             var schemaElements = new List<Tuple<string, XmlSchemaElement>>();
             var schemaReferences = new Dictionary<string, SchemaReferences>();
@@ -373,10 +375,12 @@

                 foreach (var kvp in schemaReferences.SelectMany(x => x.Value.Types).Where(x => x.Value == null).ToList())
                 {
-                    if (!schemaTypeDefinitions.TryGetValue(XName.Get(kvp.Key.Name, kvp.Key.Namespace), out var typeDefinition))
+                    var schemaTypeName = XName.Get(kvp.Key.Name, kvp.Key.Namespace);
+
+                    if (!schemaTypeDefinitions.TryGetValue(schemaTypeName, out var typeDefinition))
                         continue;

-                    if (typeDefinition.IsSimpleType)
+                    if (typeDefinition.IsSimpleType || !builtTypes.Add(schemaTypeName))
                         continue;

                     XmlSchemaType schemaType;


Add doc comments to the main methods.

Add doc comments to the main methods.

--- src/Parser.cs
+++ src/Parser.cs
@@ -15,9 +15,10 @@
     public static partial class Parser
     {
         /// <summary>
-        /// The default IColors object will automatically detect the color of the background and will
-        /// use the appropriate colors when generating the help
+        /// Parse the specified <paramref name="args"/> into the option type <typeparamref name="TOptions"/>
         /// </summary>
+        /// <param name="args">An array of strings containing the arguments and their values</param>
+        /// <typeparam name="TOptions">The type of the argument values to create</typeparam>
         public static TOptions Parse<TOptions>(string[] args)
             where TOptions : new()
         {
@@ -29,18 +30,37 @@
             return options;
         }

+        /// <summary>
+        /// Parse the specified <paramref name="strArgs"/> string into the option type <typeparamref name="TOptions"/>
+        /// </summary>
+        /// <param name="strArgs">A string containing the arguments and their values</param>
+        /// <typeparam name="TOptions">The type of the argument values to create</typeparam>
         public static TOptions Parse<TOptions>(string strArgs)
             where TOptions : new()
         {
             return Parse<TOptions>(SplitCommandLineIntoSegments(strArgs).ToArray());
         }

+        /// <summary>
+        /// Try to parse the specified <paramref name="strArgs"/> string into the option type <typeparamref name="TOptions"/>
+        /// </summary>
+        /// <typeparam name="TOptions">The type of the argument values to create</typeparam>
+        /// <param name="strArgs">A string containing the arguments and their values</param>
+        /// <param name="options">A variable that will contain the parsed arguments as an object</param>
+        /// <returns>True if the parameters were parsed. False if not.</returns>
         public static bool TryParse<TOptions>(string strArgs, out TOptions options)
             where TOptions : new()
         {
             return TryParse(SplitCommandLineIntoSegments(strArgs).ToArray(), out options);
         }

+        /// <summary>
+        /// Try to parse the specified <paramref name="args"/> string into the option type <typeparamref name="TOptions"/>
+        /// </summary>
+        /// <typeparam name="TOptions">The type of the argument values to create</typeparam>
+        /// <param name="args">An array  containing the arguments and their values</param>
+        /// <param name="options">A variable that will contain the parsed arguments as an object</param>
+        /// <returns>True if the parameters were parsed. False if not.</returns>
         public static bool TryParse<TOptions>(string[] args, out TOptions options)
             where TOptions : new()
         {


Use Created, Changed, etc events instead of WaitForChanged().

Fixes a bug where notifications can be lost if they occur rapidly.

--- src/Runner.cs
+++ src/Runner.cs
@@ -18,9 +18,9 @@
 		protected static Dictionary<WatcherChangeTypes, Change> Changes = new Dictionary<WatcherChangeTypes, Change>();

 		private List<Thread> _threads = new List<Thread>();
-		private bool _eventOccured = false;
-		private Semaphore _semaphore = new Semaphore(0, 1);
-		private Mutex _mutex = new Mutex();
+		private bool _stopMonitoring = false;
+		private ManualResetEventSlim _stopMonitoringEvent;
+		private object _notificationReactionLock = new object();
 		private Arguments _args = null;

 		static Runner()
@@ -39,6 +39,51 @@
 		protected void OnWatcherError(object source, ErrorEventArgs e)
 		{
 			Console.Error.WriteLine("*** {0}", e.GetException());
+		}
+
+		private void OnWatcherNotification(object sender, FileSystemEventArgs e)
+		{
+		    FileSystemWatcher w = (FileSystemWatcher)sender;
+		    HandleNotification(w, e, () => Output(Console.Out, _args.Format, w, Changes[e.ChangeType], e.Name));
+		}
+
+		private void OnRenameNotification(object sender, RenamedEventArgs e)
+		{
+		    FileSystemWatcher w = (FileSystemWatcher)sender;
+		    HandleNotification(w, e, () =>
+		    {
+		        Output(Console.Out, _args.Format, w, Change.MOVED_FROM, e.OldName);
+		        Output(Console.Out, _args.Format, w, Change.MOVED_TO, e.Name);
+		    });
+		}
+
+		private void HandleNotification(FileSystemWatcher sender, FileSystemEventArgs e, Action outputAction)
+		{
+		    FileSystemWatcher w = (FileSystemWatcher)sender;
+		    // Lock so we don't output more than one change if we were only supposed to watch for one.
+		    // And to serialize access to the console
+		    lock (_notificationReactionLock)
+		    {
+		        // if only looking for one change and another thread beat us to it, return
+		        if (!_args.Monitor && _stopMonitoring)
+		        {
+		            return;
+		        }
+
+		        if (null != _args.Exclude && _args.Exclude.IsMatch(e.FullPath))
+		        {
+		            return;
+		        }
+
+		        outputAction();
+
+		        // If only looking for one change, signal to stop
+		        if (!_args.Monitor)
+		        {
+		            _stopMonitoring = true;
+		            _stopMonitoringEvent.Set();
+		        }
+		    }
 		}

 		/// Output method
@@ -79,18 +124,22 @@
 				if (_args.Events.Contains("create"))
 				{
 					changes |= WatcherChangeTypes.Created;
+					w.Created += new FileSystemEventHandler(OnWatcherNotification);
 				}
 				if (_args.Events.Contains("modify"))
 				{
 					changes |= WatcherChangeTypes.Changed;
+					w.Changed += new FileSystemEventHandler(OnWatcherNotification);
 				}
 				if (_args.Events.Contains("delete"))
 				{
 					changes |= WatcherChangeTypes.Deleted;
+					w.Deleted += new FileSystemEventHandler(OnWatcherNotification);
 				}
 				if (_args.Events.Contains("move"))
 				{
 					changes |= WatcherChangeTypes.Renamed;
+					w.Renamed += new RenamedEventHandler(OnRenameNotification);
 				}

 				// Main loop
@@ -106,56 +155,30 @@
 					);
 				}
 				w.EnableRaisingEvents = true;
-				while (true)
-				{
-					var e = w.WaitForChanged(changes);
-					_mutex.WaitOne();
-					if (_eventOccured)
-					{
-						_mutex.ReleaseMutex();
-						break;
-					}
-					if (null != _args.Exclude && _args.Exclude.IsMatch(System.IO.Path.GetFullPath(e.Name)))
-					{
-						_mutex.ReleaseMutex();
-						continue;
-					}
-					if (WatcherChangeTypes.Renamed.Equals(e.ChangeType))
-					{
-						Output(Console.Out, _args.Format, w, Change.MOVED_FROM, e.OldName);
-						Output(Console.Out, _args.Format, w, Change.MOVED_TO, e.Name);
-					}
-					else
-					{
-						Output(Console.Out, _args.Format, w, Changes[e.ChangeType], e.Name);
-					}
-					if (!_args.Monitor)
-					{
-						_eventOccured = true;
-						_semaphore.Release();
-					}
-					_mutex.ReleaseMutex();
-				}
+				_stopMonitoringEvent.Wait();
 			}
 		}

 		/// Entry point
 		public int Run()
 		{
-			foreach (var path in _args.Paths)
+			using (_stopMonitoringEvent = new ManualResetEventSlim(initialState: false))
 			{
-				Thread t = new Thread(new ParameterizedThreadStart(Processor));
-				t.Start(path);
-				_threads.Add(t);
-			}
-			_semaphore.WaitOne();
-			foreach (var thread in _threads)
-			{
-				if (thread.IsAlive)
-					thread.Abort();
-				thread.Join();
-			}
-			return 0;
+			    foreach (var path in _args.Paths)
+			    {
+			        Thread t = new Thread(new ParameterizedThreadStart(Processor));
+			        t.Start(path);
+			        _threads.Add(t);
+			    }
+			    _stopMonitoringEvent.Wait();
+			    foreach (var thread in _threads)
+			    {
+			        if (thread.IsAlive)
+			            thread.Abort();
+			        thread.Join();
+			    }
+			    return 0;
+			}
 		}

 		/// Entry point method


(maint) collapse error unless debug

(maint) collapse error unless debug

Reduce the error message to just the message during normal operation. Expand
the message with more information during -d, /d, or any argument containing
debug.

Since the configuration variables may not be available, use primitive means of
seeing if the debug argument was specified. This means it cannot be combined
with other short args.

--- src/chocolatey.console/Program.cs
+++ src/chocolatey.console/Program.cs
@@ -69,12 +69,30 @@
             }
             catch (Exception ex)
             {
-                "chocolatey".Log().Error(() => "{0} had an error on {1} (with user {2}):{3}{4}".format_with(
-                    ApplicationParameters.Name,
-                    Environment.MachineName,
-                    Environment.UserName,
-                    Environment.NewLine,
-                    ex.ToString()));
+                var debug = false;
+                // no access to the good stuff here, need to go a bit primitive in parsing args
+                foreach (var arg in args.or_empty_list_if_null())
+                {
+                    if (arg.Contains("debug") || arg.is_equal_to("-d") || arg.is_equal_to("/d"))
+                    {
+                        debug = true;
+                        break;
+                    }
+                }
+
+                if (debug)
+                {
+                    "chocolatey".Log().Error(() => "{0} had an error on {1} (with user {2}):{3}{4}".format_with(
+                                  ApplicationParameters.Name,
+                                  Environment.MachineName,
+                                  Environment.UserName,
+                                  Environment.NewLine,
+                                  ex.ToString()));
+                }
+                else
+                {
+                    "chocolatey".Log().Error(ChocolateyLoggers.Important,() => "{0}".format_with(ex.Message));
+                }

                 Environment.ExitCode = 1;
             }


Add Stream.ReadToEnd extension method

Add Stream.ReadToEnd extension method

--- src/corex/Extensions/System.IO.cs
+++ src/corex/Extensions/System.IO.cs
@@ -318,5 +318,13 @@
             return dir.GetFileSystemInfos("*", recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly);
         }

+        public static string ReadToEnd(this Stream stream)
+        {
+            using (var reader = new StreamReader(stream))
+            {
+                return reader.ReadToEnd();
+            }
+        }
+
     }
 }


Add private, sequential and sealed to type signatures.

--- src/dotnet-ildasm/Disassembler.cs
+++ src/dotnet-ildasm/Disassembler.cs
@@ -178,8 +178,11 @@

             if (type.IsPublic)
                 _outputWriter.Write(" public");
-            else if (type.IsNotPublic)
+            else
                 _outputWriter.Write(" private");
+
+            if (type.IsSequentialLayout)
+                _outputWriter.Write(" sequential");

             if (type.IsInterface)
                 _outputWriter.Write(" interface");
@@ -192,6 +195,9 @@

             if (type.IsAnsiClass)
                 _outputWriter.Write(" ansi");
+
+            if (type.IsAbstract)
+                _outputWriter.Write(" sealed");

             if (type.IsBeforeFieldInit)
                 _outputWriter.Write(" beforefieldinit");


better unit of work

better unit of work

--- MasDev.Common/Data/NHibernate/MasDev.Common.Data.NHibernate.Mono/Source/NHibernateUnitOfWork.cs
+++ MasDev.Common/Data/NHibernate/MasDev.Common.Data.NHibernate.Mono/Source/NHibernateUnitOfWork.cs
@@ -7,8 +7,9 @@
 {
 	public class NHibernateUnitOfWork : IUnitOfWork
 	{
-		readonly ISession _session;
+		readonly Lazy<ISession> _session;
 		readonly Lazy<ISession> _readonlySession;
+		readonly Lazy<ISession> _parallelSession;

 		ITransaction _transaction;
 		volatile int _consumers = 0;
@@ -17,9 +18,10 @@
 		{
 			if (factory == null)
 				throw new ArgumentNullException ();
-			_session = factory.OpenSession ();
-			_session.FlushMode = FlushMode.Commit;
-
+
+			_session = GetDefaultSessionLazy (factory);
+			_parallelSession = GetDefaultSessionLazy (factory);
+
 			_readonlySession = new Lazy<ISession> (() => {
 				var session = factory.OpenSession ();
 				session.FlushMode = FlushMode.Never;
@@ -27,18 +29,29 @@
 			}, true);
 		}

+		static Lazy<ISession> GetDefaultSessionLazy (ISessionFactory factory)
+		{
+			return new Lazy<ISession> (() => {
+				var session = factory.OpenSession ();
+				session.FlushMode = FlushMode.Commit;
+				return session;
+			});
+		}
+
+		public ISession Session { get { return _session.Value; } }
+
+		public ISession ReadonlySession { get { return _readonlySession.Value; } }
+
+		public ISession ParallelSession { get { return _parallelSession.Value; } }
+
 		public void Consume ()
 		{
 			_consumers++;
 		}

-		public ISession Session { get { return _session; } }
-
-		public ISession ReadonlySession { get { return _readonlySession.Value; } }
-
 		public void Start ()
 		{
-			_transaction = _session.BeginTransaction (IsolationLevel.ReadCommitted);
+			_transaction = _session.Value.BeginTransaction (IsolationLevel.ReadCommitted);
 		}

 		public bool IsStarted { get { return _transaction != null; } }
@@ -93,8 +106,16 @@
 			if (_readonlySession.IsValueCreated)
 				_readonlySession.Value.Dispose ();

-			_session.Close ();
-			_session.Dispose ();
+			DisposeSession (_parallelSession);
+			DisposeSession (_session);
+		}
+
+		static void DisposeSession (Lazy<ISession> session)
+		{
+			if (!session.IsValueCreated)
+				return;
+			session.Value.Close ();
+			session.Value.Dispose ();
 		}
 	}
 }


9679: comment some code

9679: comment some code

--- a_mini/projects/PixelFarm/Typography/PixelFarm.Typography/1.1_Drawing_Fonts/GlyphPathBuilder.cs
+++ a_mini/projects/PixelFarm/Typography/PixelFarm.Typography/1.1_Drawing_Fonts/GlyphPathBuilder.cs
@@ -146,15 +146,15 @@
                         new_advanced = (int)Math.Ceiling(new_advanced);
                     }
                 }
-                else if (s_minX < 0.5f)
-                {
-                    abc.x_offset = 1;
-                    //move org to left 1 px
-                    if (new_xmax + 0.66f > new_advanced)
-                    {
-                        new_advanced = (int)Math.Ceiling(new_advanced);
-                    }
-                }
+                //else if (s_minX < 0.5f)
+                //{
+                //    //abc.x_offset = 1;
+                //    ////move org to left 1 px
+                //    //if (new_xmax + 0.66f > new_advanced)
+                //    //{
+                //    //    new_advanced = (int)Math.Ceiling(new_advanced);
+                //    //}
+                //}
                 abc.w = (short)Math.Round(new_advanced);
                 return abc;
             }


Replace default arguments with overload

Replace default arguments with overload

--- Mappy/Services/MapLoadingService.cs
+++ Mappy/Services/MapLoadingService.cs
@@ -65,7 +65,12 @@
             return new UndoableMapModel(m, filename, false);
         }

-        public UndoableMapModel CreateFromHpi(string hpipath, string mappath, bool readOnly = false)
+        public UndoableMapModel CreateFromHpi(string hpipath, string mappath)
+        {
+            return this.CreateFromHpi(hpipath, mappath, false);
+        }
+
+        public UndoableMapModel CreateFromHpi(string hpipath, string mappath, bool readOnly)
         {
             MapModel m;


Tweak sidebar size to get rid of horizontal scrollbar

--- Mappy/UI/Forms/MainForm.Designer.cs
+++ Mappy/UI/Forms/MainForm.Designer.cs
@@ -393,7 +393,7 @@
             this.tabControl1.Location = new System.Drawing.Point(0, 24);
             this.tabControl1.Name = "tabControl1";
             this.tabControl1.SelectedIndex = 0;
-            this.tabControl1.Size = new System.Drawing.Size(202, 538);
+            this.tabControl1.Size = new System.Drawing.Size(215, 538);
             this.tabControl1.TabIndex = 4;
             //
             // tabPage1
@@ -402,7 +402,7 @@
             this.tabPage1.Location = new System.Drawing.Point(4, 22);
             this.tabPage1.Name = "tabPage1";
             this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
-            this.tabPage1.Size = new System.Drawing.Size(194, 512);
+            this.tabPage1.Size = new System.Drawing.Size(207, 512);
             this.tabPage1.TabIndex = 0;
             this.tabPage1.Text = "Sections";
             this.tabPage1.UseVisualStyleBackColor = true;
@@ -413,7 +413,7 @@
             this.sectionView1.Location = new System.Drawing.Point(3, 3);
             this.sectionView1.Name = "sectionView1";
             this.sectionView1.Sections = null;
-            this.sectionView1.Size = new System.Drawing.Size(188, 506);
+            this.sectionView1.Size = new System.Drawing.Size(201, 506);
             this.sectionView1.TabIndex = 3;
             //
             // tabPage2
@@ -458,15 +458,16 @@
             // imageLayerView1
             //
             this.imageLayerView1.AllowDrop = true;
+            this.imageLayerView1.CanvasColor = System.Drawing.Color.CornflowerBlue;
             this.imageLayerView1.CanvasSize = new System.Drawing.Size(0, 0);
             this.imageLayerView1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.imageLayerView1.GridColor = System.Drawing.Color.Black;
             this.imageLayerView1.GridSize = new System.Drawing.Size(16, 16);
             this.imageLayerView1.GridVisible = false;
-            this.imageLayerView1.Location = new System.Drawing.Point(202, 24);
+            this.imageLayerView1.Location = new System.Drawing.Point(215, 24);
             this.imageLayerView1.Name = "imageLayerView1";
             this.imageLayerView1.SelectedItem = null;
-            this.imageLayerView1.Size = new System.Drawing.Size(582, 538);
+            this.imageLayerView1.Size = new System.Drawing.Size(569, 538);
             this.imageLayerView1.TabIndex = 5;
             this.imageLayerView1.Text = "imageLayerView1";
             //


Refactor of logic

Refactor of logic


(maint) Corrected variable name for travis detection


Revert "Update"

Revert "Update"

This reverts commit 94087716e23f1f7583f5733a27fdca71c3cc5e19.


Added missing enum type (#1046)

Added missing enum type (#1046)


Fix mono compat in test

Fix mono compat in test

--- MedallionShell.Tests/GeneralTest.cs
+++ MedallionShell.Tests/GeneralTest.cs
@@ -581,11 +581,26 @@
             {
                 command.StandardInput.WriteLine(new string('a', i));
             }
-            command.Task.IsCompleted.ShouldEqual(false);
-
-            command.StandardInput.Dispose();
-            command.Task.Wait(TimeSpan.FromSeconds(1000)).ShouldEqual(true);
-            command.Result.Success.ShouldEqual(Type.GetType("Mono.Runtime") == null);
+
+            // workaround for https://github.com/mono/mono/issues/18279; so far
+            // I've encountered this only on Mono Linux
+            if (Type.GetType("Mono.Runtime") != null
+                && !RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+            {
+                command.StandardInput.Dispose();
+                command.Task.Wait(TimeSpan.FromSeconds(1000)).ShouldEqual(true);
+                command.Result.ExitCode.ShouldEqual(1);
+                // SampleCommand fails because it's attempt to write to Console.Out fails hard
+                Assert.That(command.Result.StandardError, Does.Contain("System.IO.IOException: Write fault"));
+            }
+            else
+            {
+                command.Task.IsCompleted.ShouldEqual(false);
+
+                command.StandardInput.Dispose();
+                command.Task.Wait(TimeSpan.FromSeconds(1000)).ShouldEqual(true);
+                command.Result.Success.ShouldEqual(Type.GetType("Mono.Runtime") == null);
+            }
         }

         private IEnumerable<string> ErrorLines()


Add newer algorithms to the AssemblyHashAlgorithm enum. (#656)

* Add newer algorithms to the AssemblyHashAlgorithm enum.

* Format changes

Co-authored-by: Jb Evain <7b85a41a628204b76aba4326273a3ccc74bd009a@evain.net>

--- Mono.Cecil/AssemblyHashAlgorithm.cs
+++ Mono.Cecil/AssemblyHashAlgorithm.cs
@@ -12,7 +12,11 @@

 	public enum AssemblyHashAlgorithm : uint {
 		None		= 0x0000,
-		Reserved	= 0x8003,	// MD5
-		SHA1		= 0x8004
+		MD5		= 0x8003,
+		SHA1		= 0x8004,
+		SHA256		= 0x800C,
+		SHA384		= 0x800D,
+		SHA512		= 0x800E,
+		Reserved	= 0x8003, // MD5
 	}
 }


Fixed weird white spaces on github only

Fixed weird white spaces on github only

--- MyPet/Services/AzureDataServices.cs
+++ MyPet/Services/AzureDataServices.cs
@@ -6,13 +6,11 @@
 {
     public class AzureDataServices
     {
-		public MobileServiceClient MobileService { get; set; }
+	public MobileServiceClient MobileService { get; set; }

         public AzureDataServices()
-		{
+	{
             MobileService = new MobileServiceClient(Constants.API_URL);
-		}
-
-
+	}
     }
 }


A different way to lower the barrier of entry. Just let routed states through. This is consistent with how Mvc/Api will work. Take an existing project with a page called Example.aspx. After adding Navigation, requests to this page will fail. To make them work add a Route for this page, RouteTable.Routes.MapPageRoute("Example", "Example.aspx", "~/Example.aspx"); The request will still fail because the Route will be blank, but this can be fixed by setting RouteExistingFiles to true, RouteTable.Routes.RouteExistingFiles = true; Now a request to Example.aspx works

--- Navigation/WebForms/StateAdapter.cs
+++ Navigation/WebForms/StateAdapter.cs
@@ -61,6 +61,10 @@
 						data.Add(key, Page.Request.QueryString[key]);
 					StateController.Navigate(_DialogPaths[Page.AppRelativeVirtualPath.ToUpperInvariant()].Key, data);
 				}
+#if NET40Plus
+				if (Page.RouteData.Route != null)
+					return base.DeterminePostBackMode();
+#endif
 				throw new UrlException(Resources.InvalidUrl);
 			}
 			if (StateContext.State == null)


simple fuzzy done

simple fuzzy done

--- NestDemo/api/Search/PostEndpoint.cs
+++ NestDemo/api/Search/PostEndpoint.cs
@@ -23,7 +23,12 @@
         public Status Post()
         {
             Output = _client.Search<Customer>(sd => sd
-                .QueryString(Input.Query));
+                .Query(q => q
+                    .Fuzzy(fd => fd
+                        .OnField("_all")
+                        .MinSimilarity(0.6)
+                        .PrefixLength(1)
+                        .Value(Input.Query))));

             return Status.OK;
         }


Update StatInfo.cs - fixed variable type to match database entity

--- NinjaHive.Contract/DTOs/StatInfo.cs
+++ NinjaHive.Contract/DTOs/StatInfo.cs
@@ -17,7 +17,7 @@
         public int Intelligence { get; set; }
         public int Hunger { get; set; }
         public int Stamina { get; set; }
-        public int Resistance { get; set; }
+        public double Resistance { get; set; }

     }
 }


Add back in the reflection namespace

Add back in the reflection namespace

--- Octokit/Helpers/StringExtensions.cs
+++ Octokit/Helpers/StringExtensions.cs
@@ -3,6 +3,7 @@
 using System.Diagnostics.CodeAnalysis;
 using System.Globalization;
 using System.Net;
+using System.Reflection;
 using System.Text;
 using System.Text.RegularExpressions;