Delete 20151118233615_PostRC1MergeChanges.cs

--- AllReadyApp/Web-App/AllReady/Migrations/20151118233615_PostRC1MergeChanges.cs
+++ AllReadyApp/Web-App/AllReady/Migrations/20151118233615_PostRC1MergeChanges.cs
@@ -1,293 +0,0 @@
-using Microsoft.Data.Entity.Migrations;
-
-namespace AllReady.Migrations
-{
-    public partial class PostRC1MergeChanges : Migration
-    {
-        protected override void Up(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.DropForeignKey(name: "FK_Activity_Campaign_CampaignId", table: "Activity");
-            migrationBuilder.DropForeignKey(name: "FK_ActivitySkill_Activity_ActivityId", table: "ActivitySkill");
-            migrationBuilder.DropForeignKey(name: "FK_ActivitySkill_Skill_SkillId", table: "ActivitySkill");
-            migrationBuilder.DropForeignKey(name: "FK_Campaign_Tenant_ManagingTenantId", table: "Campaign");
-            migrationBuilder.DropForeignKey(name: "FK_CampaignContact_Campaign_CampaignId", table: "CampaignContact");
-            migrationBuilder.DropForeignKey(name: "FK_CampaignContact_Contact_ContactId", table: "CampaignContact");
-            migrationBuilder.DropForeignKey(name: "FK_TaskSkill_Skill_SkillId", table: "TaskSkill");
-            migrationBuilder.DropForeignKey(name: "FK_TaskSkill_AllReadyTask_TaskId", table: "TaskSkill");
-            migrationBuilder.DropForeignKey(name: "FK_TenantContact_Contact_ContactId", table: "TenantContact");
-            migrationBuilder.DropForeignKey(name: "FK_TenantContact_Tenant_TenantId", table: "TenantContact");
-            migrationBuilder.DropForeignKey(name: "FK_UserSkill_Skill_SkillId", table: "UserSkill");
-            migrationBuilder.DropForeignKey(name: "FK_UserSkill_ApplicationUser_UserId", table: "UserSkill");
-            migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
-            migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
-            migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
-            migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
-            migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
-            migrationBuilder.DropColumn(name: "PercentComplete", table: "CampaignImpact");
-            migrationBuilder.AddForeignKey(
-                name: "FK_Activity_Campaign_CampaignId",
-                table: "Activity",
-                column: "CampaignId",
-                principalTable: "Campaign",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_ActivitySkill_Activity_ActivityId",
-                table: "ActivitySkill",
-                column: "ActivityId",
-                principalTable: "Activity",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_ActivitySkill_Skill_SkillId",
-                table: "ActivitySkill",
-                column: "SkillId",
-                principalTable: "Skill",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_Campaign_Tenant_ManagingTenantId",
-                table: "Campaign",
-                column: "ManagingTenantId",
-                principalTable: "Tenant",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_CampaignContact_Campaign_CampaignId",
-                table: "CampaignContact",
-                column: "CampaignId",
-                principalTable: "Campaign",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_CampaignContact_Contact_ContactId",
-                table: "CampaignContact",
-                column: "ContactId",
-                principalTable: "Contact",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_TaskSkill_Skill_SkillId",
-                table: "TaskSkill",
-                column: "SkillId",
-                principalTable: "Skill",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_TaskSkill_AllReadyTask_TaskId",
-                table: "TaskSkill",
-                column: "TaskId",
-                principalTable: "AllReadyTask",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_TenantContact_Contact_ContactId",
-                table: "TenantContact",
-                column: "ContactId",
-                principalTable: "Contact",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_TenantContact_Tenant_TenantId",
-                table: "TenantContact",
-                column: "TenantId",
-                principalTable: "Tenant",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_UserSkill_Skill_SkillId",
-                table: "UserSkill",
-                column: "SkillId",
-                principalTable: "Skill",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_UserSkill_ApplicationUser_UserId",
-                table: "UserSkill",
-                column: "UserId",
-                principalTable: "AspNetUsers",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
-                table: "AspNetRoleClaims",
-                column: "RoleId",
-                principalTable: "AspNetRoles",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
-                table: "AspNetUserClaims",
-                column: "UserId",
-                principalTable: "AspNetUsers",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
-                table: "AspNetUserLogins",
-                column: "UserId",
-                principalTable: "AspNetUsers",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
-                table: "AspNetUserRoles",
-                column: "RoleId",
-                principalTable: "AspNetRoles",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-            migrationBuilder.AddForeignKey(
-                name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
-                table: "AspNetUserRoles",
-                column: "UserId",
-                principalTable: "AspNetUsers",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Cascade);
-        }
-
-        protected override void Down(MigrationBuilder migrationBuilder)
-        {
-            migrationBuilder.DropForeignKey(name: "FK_Activity_Campaign_CampaignId", table: "Activity");
-            migrationBuilder.DropForeignKey(name: "FK_ActivitySkill_Activity_ActivityId", table: "ActivitySkill");
-            migrationBuilder.DropForeignKey(name: "FK_ActivitySkill_Skill_SkillId", table: "ActivitySkill");
-            migrationBuilder.DropForeignKey(name: "FK_Campaign_Tenant_ManagingTenantId", table: "Campaign");
-            migrationBuilder.DropForeignKey(name: "FK_CampaignContact_Campaign_CampaignId", table: "CampaignContact");
-            migrationBuilder.DropForeignKey(name: "FK_CampaignContact_Contact_ContactId", table: "CampaignContact");
-            migrationBuilder.DropForeignKey(name: "FK_TaskSkill_Skill_SkillId", table: "TaskSkill");
-            migrationBuilder.DropForeignKey(name: "FK_TaskSkill_AllReadyTask_TaskId", table: "TaskSkill");
-            migrationBuilder.DropForeignKey(name: "FK_TenantContact_Contact_ContactId", table: "TenantContact");
-            migrationBuilder.DropForeignKey(name: "FK_TenantContact_Tenant_TenantId", table: "TenantContact");
-            migrationBuilder.DropForeignKey(name: "FK_UserSkill_Skill_SkillId", table: "UserSkill");
-            migrationBuilder.DropForeignKey(name: "FK_UserSkill_ApplicationUser_UserId", table: "UserSkill");
-            migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
-            migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
-            migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
-            migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
-            migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
-            migrationBuilder.AddColumn<int>(
-                name: "PercentComplete",
-                table: "CampaignImpact",
-                nullable: false,
-                defaultValue: 0);
-            migrationBuilder.AddForeignKey(
-                name: "FK_Activity_Campaign_CampaignId",
-                table: "Activity",
-                column: "CampaignId",
-                principalTable: "Campaign",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_ActivitySkill_Activity_ActivityId",
-                table: "ActivitySkill",
-                column: "ActivityId",
-                principalTable: "Activity",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_ActivitySkill_Skill_SkillId",
-                table: "ActivitySkill",
-                column: "SkillId",
-                principalTable: "Skill",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_Campaign_Tenant_ManagingTenantId",
-                table: "Campaign",
-                column: "ManagingTenantId",
-                principalTable: "Tenant",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_CampaignContact_Campaign_CampaignId",
-                table: "CampaignContact",
-                column: "CampaignId",
-                principalTable: "Campaign",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_CampaignContact_Contact_ContactId",
-                table: "CampaignContact",
-                column: "ContactId",
-                principalTable: "Contact",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_TaskSkill_Skill_SkillId",
-                table: "TaskSkill",
-                column: "SkillId",
-                principalTable: "Skill",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_TaskSkill_AllReadyTask_TaskId",
-                table: "TaskSkill",
-                column: "TaskId",
-                principalTable: "AllReadyTask",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_TenantContact_Contact_ContactId",
-                table: "TenantContact",
-                column: "ContactId",
-                principalTable: "Contact",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_TenantContact_Tenant_TenantId",
-                table: "TenantContact",
-                column: "TenantId",
-                principalTable: "Tenant",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_UserSkill_Skill_SkillId",
-                table: "UserSkill",
-                column: "SkillId",
-                principalTable: "Skill",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_UserSkill_ApplicationUser_UserId",
-                table: "UserSkill",
-                column: "UserId",
-                principalTable: "AspNetUsers",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
-                table: "AspNetRoleClaims",
-                column: "RoleId",
-                principalTable: "AspNetRoles",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
-                table: "AspNetUserClaims",
-                column: "UserId",
-                principalTable: "AspNetUsers",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
-                table: "AspNetUserLogins",
-                column: "UserId",
-                principalTable: "AspNetUsers",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
-                table: "AspNetUserRoles",
-                column: "RoleId",
-                principalTable: "AspNetRoles",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-            migrationBuilder.AddForeignKey(
-                name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
-                table: "AspNetUserRoles",
-                column: "UserId",
-                principalTable: "AspNetUsers",
-                principalColumn: "Id",
-                onDelete: ReferentialAction.Restrict);
-        }
-    }
-}


Fix exception with explosions and storage items.

--- Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs
+++ Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs
@@ -496,7 +496,7 @@

             foreach (var entity in storedEntities)
             {
-                var exActs = entity.GetAllComponents<IExAct>();
+                var exActs = entity.GetAllComponents<IExAct>().ToArray();
                 foreach (var exAct in exActs)
                 {
                     exAct.OnExplosion(eventArgs);


Fix renew all logic for items not yet requested

--- src/Certify.Core/Management/CertifyManager/CertifyManager.CertificateRequest.cs
+++ src/Certify.Core/Management/CertifyManager/CertifyManager.CertificateRequest.cs
@@ -15,11 +15,11 @@
     public partial class CertifyManager
     {
         /// <summary>
-        /// Perform Renew All: identify all items to renew then initiate renewal process
+        /// Perform Renew All: identify all items to renew then initiate renewal process
         /// </summary>
-        /// <param name="autoRenewalOnly"></param>
-        /// <param name="progressTrackers"></param>
-        /// <returns></returns>
+        /// <param name="autoRenewalOnly">  </param>
+        /// <param name="progressTrackers">  </param>
+        /// <returns>  </returns>
         public async Task<List<CertificateRequestResult>> PerformRenewalAllManagedCertificates(bool autoRenewalOnly = true, Dictionary<string, Progress<RequestProgressState>> progressTrackers = null)
         {
             if (_isRenewAllInProgress)
@@ -172,15 +172,18 @@
         /// if we know the last renewal date, check whether we should renew again, otherwise assume
         /// it's more than 30 days ago by default and attempt renewal
         /// </summary>
-        /// <param name="s"></param>
-        /// <param name="renewalIntervalDays"></param>
-        /// <param name="checkFailureStatus"></param>
-        /// <returns></returns>
+        /// <param name="s">  </param>
+        /// <param name="renewalIntervalDays">  </param>
+        /// <param name="checkFailureStatus">  </param>
+        /// <returns>  </returns>
         public static bool IsRenewalRequired(ManagedCertificate s, int renewalIntervalDays, bool checkFailureStatus = false)
         {
             var timeSinceLastRenewal = (s.DateRenewed ?? DateTime.Now.AddDays(-30)) - DateTime.Now;

             var isRenewalRequired = Math.Abs(timeSinceLastRenewal.TotalDays) > renewalIntervalDays;
+
+            // if we have never attempted renewal, renew now
+            if (!isRenewalRequired && s.DateLastRenewalAttempt == null) isRenewalRequired = true;

             // if renewal is required but we have previously failed, scale the frequency of renewal
             // attempts to a minimum of once per 24hrs.
@@ -210,12 +213,12 @@
         }

         /// <summary>
-        /// Test dummy method for async UI testing etc
+        /// Test dummy method for async UI testing etc
         /// </summary>
-        /// <param name="vaultManager"></param>
-        /// <param name="managedCertificate"></param>
-        /// <param name="progress"></param>
-        /// <returns></returns>
+        /// <param name="vaultManager">  </param>
+        /// <param name="managedCertificate">  </param>
+        /// <param name="progress">  </param>
+        /// <returns>  </returns>
         public async Task<CertificateRequestResult> PerformDummyCertificateRequest(ManagedCertificate managedCertificate, IProgress<RequestProgressState> progress = null)
         {
             return await Task.Run(async () =>
@@ -236,12 +239,12 @@
         }

         /// <summary>
-        /// Initiate or resume the certificate request workflow for a given managed certificate
+        /// Initiate or resume the certificate request workflow for a given managed certificate
         /// </summary>
-        /// <param name="log"></param>
-        /// <param name="managedCertificate"></param>
-        /// <param name="progress"></param>
-        /// <returns></returns>
+        /// <param name="log">  </param>
+        /// <param name="managedCertificate">  </param>
+        /// <param name="progress">  </param>
+        /// <returns>  </returns>
         public async Task<CertificateRequestResult> PerformCertificateRequest(ILog log, ManagedCertificate managedCertificate, IProgress<RequestProgressState> progress = null, bool resumePaused = false)
         {
             // Perform pre-request checks and scripting hooks, invoke main request process, then
@@ -814,7 +817,6 @@
                         if (await IsHttpChallengeProcessStarted())
                         {
                             _httpChallengeServerAvailable = true;
-
                         }
                         else
                         {
@@ -824,11 +826,9 @@
                         if (_httpChallengeServerAvailable)
                         {
                             LogMessage(managedCertificate.Id, $"Http Challenge Server process available.", LogItemType.CertificateRequestStarted);
-
                         }
                         else
                         {
-
                             LogMessage(managedCertificate.Id, $"Http Challenge Server process unavailable.", LogItemType.CertificateRequestStarted);
                         }
                     }
@@ -870,14 +870,14 @@
                                 });
                         }

-
                         // ask LE to check our answer to their authorization challenge (http-01 or
                         // tls-sni-01), LE will then attempt to fetch our answer, if all accessible
                         // and correct (authorized) LE will then allow us to request a certificate
                         authorization = await _challengeDiagnostics.PerformAutomatedChallengeResponse(log,
                             _serverProvider, managedCertificate, authorization);

-                        // if we had automated checks configured and they failed more than twice in a row, fail and report error here
+                        // if we had automated checks configured and they failed more than twice in a
+                        // row, fail and report error here
                         if (
                             managedCertificate.RenewalFailureCount > 2
                             &&


Implemented WebGLSocketThreadeRunnableStarterStrategy

--- src/Client/Rs317.Client.Unity/WebGL/WebGLSocketThreadRunnableStarterStrategy.cs
+++ src/Client/Rs317.Client.Unity/WebGL/WebGLSocketThreadRunnableStarterStrategy.cs
@@ -6,9 +6,15 @@
 {
 	public sealed class WebGLSocketThreadRunnableStarterStrategy : IRunnableStarter
 	{
+		private UpdateTickRunnableComponent CurrentRunnableHandler { get; set; } = null;
+
 		public void StartRunnable(IRunnable runnable, int priority)
 		{
-			throw new NotImplementedException($"TODO: Implement WebGL socket thread runnable starter.");
+			if(CurrentRunnableHandler != null)
+				UnityEngine.GameObject.Destroy(CurrentRunnableHandler.gameObject);
+
+			CurrentRunnableHandler = new UnityEngine.GameObject("WebGL Socket Runnable Handler").AddComponent<UpdateTickRunnableComponent>();
+			CurrentRunnableHandler.RunnableObject = runnable;
 		}
 	}
 }


chore(language translator v2): Apply manual changes

--- src/IBM.WatsonDeveloperCloud.LanguageTranslator.v2/LanguageTranslatorService.cs
+++ src/IBM.WatsonDeveloperCloud.LanguageTranslator.v2/LanguageTranslatorService.cs
@@ -32,12 +32,14 @@
     {
         const string SERVICE_NAME = "language_translator";
         const string URL = "https://gateway.watsonplatform.net/language-translator/api";
+        [Obsolete("Language Translator v3 is now available. The v2 Language Translator API will no longer be available after July 31, 2018. To take advantage of the latest service enhancements, migrate to the v3 API. View the [Migrating to Language Translator v3](https://console.bluemix.net/docs/services/language-translator/migrating.html) page for more information.")]
         public LanguageTranslatorService() : base(SERVICE_NAME, URL)
         {
             if(!string.IsNullOrEmpty(this.Endpoint))
                 this.Endpoint = URL;
-        }
-
+        }
+
+        [Obsolete("Language Translator v3 is now available. The v2 Language Translator API will no longer be available after July 31, 2018. To take advantage of the latest service enhancements, migrate to the v3 API. View the [Migrating to Language Translator v3](https://console.bluemix.net/docs/services/language-translator/migrating.html) page for more information.")]
         public LanguageTranslatorService(string userName, string password) : this()
         {
             if (string.IsNullOrEmpty(userName))
@@ -49,6 +51,7 @@
             this.SetCredential(userName, password);
         }

+        [Obsolete("Language Translator v3 is now available. The v2 Language Translator API will no longer be available after July 31, 2018. To take advantage of the latest service enhancements, migrate to the v3 API. View the [Migrating to Language Translator v3](https://console.bluemix.net/docs/services/language-translator/migrating.html) page for more information.")]
         public LanguageTranslatorService(TokenOptions options) : this()
         {
             if (string.IsNullOrEmpty(options.IamApiKey) && string.IsNullOrEmpty(options.IamAccessToken))
@@ -65,6 +68,7 @@
             _tokenManager = new TokenManager(options);
         }

+        [Obsolete("Language Translator v3 is now available. The v2 Language Translator API will no longer be available after July 31, 2018. To take advantage of the latest service enhancements, migrate to the v3 API. View the [Migrating to Language Translator v3](https://console.bluemix.net/docs/services/language-translator/migrating.html) page for more information.")]
         public LanguageTranslatorService(IClient httpClient) : this()
         {
             if (httpClient == null)


Increate test timout so tests can run less 'flacky'

--- src/Lime.Protocol.UnitTests/Network/Modules/ResendMessagesChannelModuleTests.cs
+++ src/Lime.Protocol.UnitTests/Network/Modules/ResendMessagesChannelModuleTests.cs
@@ -32,7 +32,7 @@
             _channel = CreateChannel();
             _resendMessageTryCount = 3;
             _resendMessageInterval = TimeSpan.FromMilliseconds(200);
-            _resendMessageIntervalWithSafeMargin = TimeSpan.FromMilliseconds(250);
+            _resendMessageIntervalWithSafeMargin = TimeSpan.FromMilliseconds(300);
             _cancellationToken = CancellationToken.None;
             _filterByDestination = false;
         }


BooleanField Default value NRE (#3543)

BooleanField Default value NRE (#3543)

--- src/OrchardCore.Modules/OrchardCore.ContentFields/Drivers/BooleanFieldDriver.cs
+++ src/OrchardCore.Modules/OrchardCore.ContentFields/Drivers/BooleanFieldDriver.cs
@@ -28,7 +28,7 @@
             {
                 model.Value = (context.IsNew == false) ?
                     field.Value :
-                    (bool)context.PartFieldDefinition.Settings["DefaultValue"];
+                    (bool)(context.PartFieldDefinition.Settings["DefaultValue"] ?? false);

                 model.Field = field;
                 model.Part = context.ContentPart;


Fix upload url not working with tenants.

--- src/OrchardCore.Modules/OrchardCore.Media/Views/MediaField-Attached.Edit.cshtml
+++ src/OrchardCore.Modules/OrchardCore.Media/Views/MediaField-Attached.Edit.cshtml
@@ -4,7 +4,6 @@

 @{
     var settings = Model.PartFieldDefinition.Settings.ToObject<MediaFieldSettings>();
-    var uploadAction = "/OrchardCore.Media/Admin/Upload";
     var mediaFieldId = Html.IdFor(m => m);
 }

@@ -15,7 +14,7 @@
     initializeAttachedMediaField(
         document.getElementById('@mediaFieldId'),
         '@mediaFieldId-field-file-upload',
-        '@uploadAction',
+        '@Url.Action("Upload", "Admin", new { area = "OrchardCore.Media" }) ',
         '@Url.Action("GetMediaItem", "Admin", new { area = "OrchardCore.Media" })',
         @(settings.Multiple ? "true" : "false"),
         '@Model.TempUploadFolder');


use test fixture rather than constructor

--- src/ResourceManager/Kubernetes/Commands.Kubernetes.Test/MergeKubeConfigTests.cs
+++ src/ResourceManager/Kubernetes/Commands.Kubernetes.Test/MergeKubeConfigTests.cs
@@ -5,24 +5,45 @@
 using Xunit;
 using YamlDotNet.RepresentationModel;
 using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using System;

 namespace Commands.Kubernetes.Test
 {
-    public class MergedKubeConfigTests
+    public class ConfigFixture
     {
         private readonly YamlNode _rootNode;

-        public MergedKubeConfigTests()
+        public ConfigFixture()
         {
             var merged = ImportAzureRmKubernetesCredential.MergeKubeConfig(File.ReadAllText("./Fixtures/config.yaml"), File.ReadAllText("./Fixtures/additional_kube_config.yaml"));
             _rootNode = RootNodeFromString(merged);
+        }
+
+        public YamlNode RootNode { get { return _rootNode;  } }
+
+        private static YamlMappingNode RootNodeFromString(string content)
+        {
+            var yaml = new YamlStream();
+            yaml.Load(new StringReader(content));
+            return (YamlMappingNode)yaml.Documents[0].RootNode;
+        }
+
+    }
+
+    public class MergedKubeConfigTests : IClassFixture<ConfigFixture>
+    {
+        ConfigFixture _configFixture;
+
+        public MergedKubeConfigTests(ConfigFixture fixture)
+        {
+            _configFixture = fixture;
         }

         [Fact]
         [Trait(Category.AcceptanceType, Category.CheckIn)]
         public void MergedKubeConfigOverwriteClustersTest()
         {
-            var clustersByName = DictOfNamedItems(_rootNode, "clusters", "cluster");
+            var clustersByName = DictOfNamedItems(_configFixture.RootNode, "clusters", "cluster");
             var helloCluster = clustersByName["hello"];
             Assert.True(GetScalar(helloCluster, "server").Value == "overwritten");
         }
@@ -31,7 +52,7 @@
         [Trait(Category.AcceptanceType, Category.CheckIn)]
         public void MergedKubeConfigOverwriteUsersTest()
         {
-            var usersByName = DictOfNamedItems(_rootNode, "users", "user");
+            var usersByName = DictOfNamedItems(_configFixture.RootNode, "users", "user");
             var clusterUser = usersByName["clusterUser_test_hello"];
             Assert.True(GetScalar(clusterUser, "token").Value == "boo");
         }
@@ -40,7 +61,7 @@
         [Trait(Category.AcceptanceType, Category.CheckIn)]
         public void MergedKubeConfigOverwriteContextTest()
         {
-            var contextByName = DictOfNamedItems(_rootNode, "contexts", "context");
+            var contextByName = DictOfNamedItems(_configFixture.RootNode, "contexts", "context");
             var helloContext = contextByName["hello"];
             Assert.True(GetScalar(helloContext, "cluster").Value == "hello");
         }
@@ -49,7 +70,7 @@
         [Trait(Category.AcceptanceType, Category.CheckIn)]
         public void MergedKubeConfigAdditiveClustersTest()
         {
-            var clustersByName = DictOfNamedItems(_rootNode, "clusters", "cluster");
+            var clustersByName = DictOfNamedItems(_configFixture.RootNode, "clusters", "cluster");
             var newCluster = clustersByName["something-new"];
             Assert.True(GetScalar(newCluster, "server").Value == "new-server");
         }
@@ -58,7 +79,7 @@
         [Trait(Category.AcceptanceType, Category.CheckIn)]
         public void MergedKubeConfigAdditiveUsersTest()
         {
-            var usersByName = DictOfNamedItems(_rootNode, "users", "user");
+            var usersByName = DictOfNamedItems(_configFixture.RootNode, "users", "user");
             var clusterUser = usersByName["new-user"];
             Assert.True(GetScalar(clusterUser, "token").Value == "boo1");
         }
@@ -67,7 +88,7 @@
         [Trait(Category.AcceptanceType, Category.CheckIn)]
         public void MergedKubeConfigAdditiveContextTest()
         {
-            var contextByName = DictOfNamedItems(_rootNode, "contexts", "context");
+            var contextByName = DictOfNamedItems(_configFixture.RootNode, "contexts", "context");
             var helloContext = contextByName["new-context"];
             Assert.True(GetScalar(helloContext, "cluster").Value == "something-new");
         }
@@ -77,7 +98,7 @@
         [Trait(Category.AcceptanceType, Category.CheckIn)]
         public void MergedKubeConfigOverwriteCurrentContextTest()
         {
-            Assert.True(GetScalar(_rootNode, "current-context").Value == "baz");
+            Assert.True(GetScalar(_configFixture.RootNode, "current-context").Value == "baz");
         }

         private static IDictionary<string, YamlNode> DictOfNamedItems(YamlNode yaml, string category, string itemName)
@@ -96,12 +117,5 @@
         {
             return (YamlScalarNode) node[new YamlScalarNode(key)];
         }
-
-        private static YamlMappingNode RootNodeFromString(string content)
-        {
-            var yaml = new YamlStream();
-            yaml.Load(new StringReader(content));
-            return (YamlMappingNode)yaml.Documents[0].RootNode;
-        }
     }
 }


Add no-yield assertion for debug builds

Add no-yield assertion for debug builds

--- src/VisualStudio/Core/Def/Implementation/Interop/CleanableWeakComHandleTable.cs
+++ src/VisualStudio/Core/Def/Implementation/Interop/CleanableWeakComHandleTable.cs
@@ -62,6 +62,8 @@
         /// </summary>
         public async Task CleanUpDeadObjectsAsync()
         {
+            Debug.Assert(ThreadingContext.JoinableTaskContext.IsOnMainThread, "This method is optimized for cases where calls do not yield before checking _needsCleanUp.");
+
             await ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(ThreadingContext.DisposalToken);

             if (!_needsCleanUp)


Add animator to wizard.

Add animator to wizard.

Signed-off-by: TheSniperFan <db7563122c08a03c83ae47e44bdc9bc661a824b1@gmail.com>

--- Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs
+++ Assets/Plugins/Editor/OpenUnityTools/unityserializer-ng/UnitySerializerWindow.cs
@@ -333,6 +333,9 @@
                         if (Has(Selection.activeGameObject, typeof(StoreMesh))) {
                             GUILayout.Label(" + mesh");
                         }
+                        if (Has(Selection.activeGameObject, typeof(StoreAnimator))) {
+                            GUILayout.Label(" + animator");
+                        }
                     }
                     GUILayout.Space(4);
                     GUI.color = Color.white;
@@ -353,10 +356,17 @@
                                         Selection.activeGameObject.AddComponent<StoreMaterials>();
                                     }
                                 }
+                            }
+                            using (new Horizontal()) {
                                 if (Selection.activeGameObject.GetComponent<StoreMesh>() == null && Selection.activeGameObject.GetComponent<StoreInformation>() != null && (Selection.activeGameObject.GetComponent<MeshFilter>() != null || Selection.activeGameObject.GetComponent<SkinnedMeshRenderer>() != null)) {
                                     if (GUILayout.Button("Store Mesh")) {
                                         Undo.RegisterSceneUndo("Change Identifiers");
                                         Selection.activeGameObject.AddComponent<StoreMesh>();
+                                    }
+                                }
+                                if (Selection.activeGameObject.GetComponent<StoreAnimator>() == null && Selection.activeGameObject.GetComponent<StoreInformation>() != null && Selection.activeGameObject.GetComponent<Animator>() != null) {
+                                    if (GUILayout.Button("Store Animator")) {
+                                        Selection.activeGameObject.AddComponent<StoreAnimator>();
                                     }
                                 }
                             }
@@ -375,7 +385,8 @@
                                         DestroyImmediate(c, true);
                                     foreach (var c in Selection.activeGameObject.GetComponents<StoreMesh>())
                                         DestroyImmediate(c, true);
-
+                                    foreach (var c in Selection.activeGameObject.GetComponents<StoreAnimator>())
+                                        DestroyImmediate(c, true);
                                 }
                                 GUI.color = Color.white;
                             }
@@ -413,7 +424,8 @@
                                         DestroyImmediate(c, true);
                                     foreach (var c in Selection.activeGameObject.GetComponents<StoreMesh>())
                                         DestroyImmediate(c, true);
-
+                                    foreach (var c in Selection.activeGameObject.GetComponents<StoreAnimator>())
+                                        DestroyImmediate(c, true);
                                 }
                                 GUI.color = Color.white;
                             }


fix qr code amounts for monero

fix qr code amounts for monero

--- BTCPayServer/Services/Altcoins/Monero/Payments/MoneroLikePaymentMethodHandler.cs
+++ BTCPayServer/Services/Altcoins/Monero/Payments/MoneroLikePaymentMethodHandler.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
 using System.Threading.Tasks;
 using BTCPayServer.Data;
@@ -84,7 +85,7 @@
             model.InvoiceBitcoinUrl = client.SendCommandAsync<MakeUriRequest, MakeUriResponse>("make_uri", new MakeUriRequest()
                 {
                     Address = cryptoInfo.Address,
-                    Amount = LightMoney.Parse(cryptoInfo.Due).MilliSatoshi
+                    Amount = MoneroMoney.Convert(decimal.Parse(cryptoInfo.Due, CultureInfo.InvariantCulture))
                 }).GetAwaiter()
                 .GetResult().Uri;
             model.InvoiceBitcoinUrlQR = model.InvoiceBitcoinUrl;


Added InputHelper which helps get basic input like numbers

--- Calculator/OptionSelector.cs
+++ Calculator/OptionSelector.cs
@@ -6,6 +6,23 @@

 namespace Calculator
 {
+    class InputHelper
+    {
+        public int GetInteger(string message, int max = int.MaxValue, int min = 0, int? defaultNum = null)
+        {
+            while (true)
+            {
+                Console.WriteLine(message);
+                var input = Console.ReadLine();
+                if (string.IsNullOrWhiteSpace(input) && defaultNum.HasValue)
+                    return defaultNum.Value;
+                int selected;
+                if (int.TryParse(input, out selected))
+                    if (selected >= min && selected <= max)
+                        return selected;
+            }
+        }
+    }
     class OptionSelector<T>
     {
         readonly KeyValuePair<string,T>[] options;


Fixed a bug when accessing request properties

--- IdentityModel/Thinktecture.IdentityModel/Tokens/Http/AuthenticationHandler.cs
+++ IdentityModel/Thinktecture.IdentityModel/Tokens/Http/AuthenticationHandler.cs
@@ -131,7 +131,7 @@
                 {
                     HttpContext.Current.Items[Internal.NoRedirectLabel] = true;
                 }
-                else if (request.Properties["MS_HttpContext"] != null)
+                else if (request.Properties.ContainsKey("MS_HttpContext") && request.Properties["MS_HttpContext"] != null)
                 {
                     var context = request.Properties["MS_HttpContext"] as HttpContextWrapper;
                     context.Items[Internal.NoRedirectLabel] = true;


Add pseudocode for deleting notifications from gui

--- KompetansetorgetXamarin/KompetansetorgetXamarin/Views/CarouselVarsler.xaml.cs
+++ KompetansetorgetXamarin/KompetansetorgetXamarin/Views/CarouselVarsler.xaml.cs
@@ -41,15 +41,18 @@
             //stillingSwitch.Toggled += stillingToggle;
             //oppgaveSwitch.Toggled += oppgaveToggle;
             //varselSwitch.Toggled += varselToggle;
-            varsler.Add(new Varsel("TEST", "TEST", "http://adila.prosjekt.uia.no/files/2015/02/UiA1.png"));
-
+            varsler.Add(new Varsel("TEST", "TEST", "http://adila.prosjekt.uia.no/files/2015/02/UiA1.png","asd","asd","www.google.com"));
+
+            PopupMenu();
+
+        }
+
+        void PopupMenu() {
             VarselList.ItemSelected += (sender, e) =>
             {
                 Varsel d = (Varsel)e.SelectedItem;
-                DisplayAlert("ListView Item select", d.Text + " Selected", "Ok");
-
+                DisplayAlert("ListView Item select", d.Text + d.Uuid + d.Webpage + " Selected", "Ok");
             };
-
         }

@@ -261,6 +264,8 @@
         public void OnMore(object sender, EventArgs e)
         {
             var mi = ((MenuItem)sender);
+            DisplayAlert("ListView Item select", mi.Text + " Selected", "Ok");
+
             DisplayAlert("More Context Action", mi.CommandParameter + " more context action", "OK");
             // varsel.Webpage
         }
@@ -272,6 +277,8 @@

             if (true)
             {
+
+                //varsler.Remove(varsel);
                 DbNotification dbNotification = new DbNotification();
                 if ("varsel.Type" == "job")
                 {


sz minor update.

sz minor update.

--- samples/cs/sz/sz.cs
+++ samples/cs/sz/sz.cs
@@ -21,7 +21,8 @@
 using System.Diagnostics;
 using System.Reflection;

-using ICSharpCode.SharpZipLib.Zip;
+using ICSharpCode.SharpZipLib.Core;
+using ICSharpCode.SharpZipLib.Zip;
 using ICSharpCode.SharpZipLib.Zip.Compression;
 using ICSharpCode.SharpZipLib.Zip.Compression.Streams;

@@ -62,12 +63,12 @@
 		public SharpZipArchiver()
 		{
 		}
-
 		#endregion
-		/// <summary>
-		/// Interpret attributes in conjunction with operatingSystem
-		/// </summary>
-		/// <param name="operatingSystem">The operating system.</param>
+
+		/// <summary>
+		/// Interpret attributes based on the operating system they are from.
+		/// </summary>
+		/// <param name="operatingSystem">The operating system to base interpretation of attributes on.</param>
 		/// <param name="attributes">The external attributes.</param>
 		/// <returns>A string representation of the attributres passed.</returns>
 		static string InterpretExternalAttributes(int operatingSystem, int attributes)
@@ -455,7 +456,11 @@
 			if (fileSpecs.Count > 0 && operation == Operation.Create) {
 				string checkPath = (string)fileSpecs[0];
 				int deviceCheck = checkPath.IndexOf(':');
+#if NET_VER_1
 				if (checkPath.IndexOfAny(Path.InvalidPathChars) >= 0
+#else
+				if (checkPath.IndexOfAny(Path.GetInvalidPathChars()) >= 0
+#endif
 				    || checkPath.IndexOf('*') >= 0 || checkPath.IndexOf('?') >= 0
 				    || (deviceCheck >= 0 && deviceCheck != 1)) {
 					Console.WriteLine("There are invalid characters in the specified zip file name");
@@ -565,8 +570,7 @@
 		void ListZip(string fileName) {
 			try
 			{
-				// TODO for asian/non-latin/non-proportional fonts string lengths dont work so output wont line up
-
+				// TODO for asian/non-latin/non-proportional fonts string lengths dont work so output may not line up
 				const string headerTitles    = "Name                 Length Ratio Size         Date & time       CRC-32";
 				const string headerUnderline = "---------------  ---------- ----- ---------- ------------------- --------";

@@ -809,13 +813,13 @@

 		// TODO: Add equivalent for non-seekable output
 		/// <summary>
-		/// Add a file assuming the output is seekable
+		/// Add a file were the output is seekable
 		/// </summary>
-		void AddFileSeekableOutput(string file, string entryPath, int maximumBufferSize)
+		void AddFileSeekableOutput(string file, string entryPath)
 		{
 			ZipEntry entry = new ZipEntry(entryPath);
 			FileInfo fileInfo = new FileInfo(file);
-			entry.DateTime = fileInfo.LastWriteTime; // File.GetLastWriteTime(file); // or DateTime.Now or whatever, for now use the file
+			entry.DateTime = fileInfo.LastWriteTime; // or DateTime.Now or whatever, for now use the file
 			entry.ExternalFileAttributes = (int)fileInfo.Attributes;
 			entry.Size = fileInfo.Length;

@@ -827,30 +831,26 @@

 			using (System.IO.FileStream fileStream = System.IO.File.OpenRead(file))
 			{
-
-				byte[] transferBuffer;
-				if (fileStream.Length > maximumBufferSize)
-					transferBuffer = new byte[maximumBufferSize];
-				else
-					transferBuffer = new byte[fileStream.Length];
-
 				outputStream.PutNextEntry(entry);
-
-				int bytesRead;
-				do {
-					bytesRead = fileStream.Read(transferBuffer, 0, transferBuffer.Length);
-					outputStream.Write(transferBuffer, 0, bytesRead);
-				}
-				while (bytesRead > 0);
-			}
+				StreamUtils.Copy(fileStream, outputStream, GetBuffer());
+			}
+		}
+
+		byte[] GetBuffer()
+		{
+			if ( buffer == null )
+			{
+				buffer = new byte[bufferSize_];
+			}
+			return buffer;
+
 		}

 		/// <summary>
 		/// Add file to archive
 		/// </summary>
 		/// <param name="fileName">file to add</param>
-		/// <param name="bufferSize">size of buffer to use with file</param>
-		void AddFile(string fileName, int bufferSize) {
+		void AddFile(string fileName) {
 #if TEST
 			Console.WriteLine("AddFile {0}", fileName);
 #endif
@@ -862,7 +862,7 @@
 					Console.Write(" " + entryName);
 				}

-				AddFileSeekableOutput(fileName, entryName, bufferSize);
+				AddFileSeekableOutput(fileName, entryName);

 				if (silent == false) {
 					Console.WriteLine("");
@@ -907,7 +907,7 @@
 			string [] names = Directory.GetFiles(basePath, searchPattern);

 			foreach (string fileName in names) {
-				AddFile(fileName, 8192);
+				AddFile(fileName);
 				++result;
 			}

@@ -977,7 +977,7 @@
 							// as part of different file specs.
 							totalEntries += CompressFolder(pathName, recursive, fileName);
 						} else {
-							AddFile(pathName + @"\" + fileName, 8192);
+							AddFile(pathName + @"\" + fileName);
 							++totalEntries;
 						}
 					}
@@ -1282,6 +1282,16 @@
 		bool seenHelp;

 		/// <summary>
+		/// The size of the buffer to use when copying.
+		/// </summary>
+		int bufferSize_ = 8192;
+
+		/// <summary>
+		/// Buffer for use when copying between streams.
+		/// </summary>
+		byte[] buffer;
+
+		/// <summary>
 		/// File specification possibly with wildcards from command line
 		/// </summary>
 		ArrayList fileSpecs = new ArrayList();
@@ -1289,17 +1299,17 @@
 		/// <summary>
 		/// Deflate compression level
 		/// </summary>
-		int    compressionLevel = Deflater.DEFAULT_COMPRESSION;
+		int compressionLevel = Deflater.DEFAULT_COMPRESSION;

 		/// <summary>
 		/// Create entries for directories with no files
 		/// </summary>
-		bool   addEmptyDirectoryEntries;
+		bool addEmptyDirectoryEntries;

 		/// <summary>
 		/// Apply operations recursively
 		/// </summary>
-		bool   recursive;
+		bool recursive;

 		/// <summary>
 		/// Use ZipFile class for listing entries
@@ -1309,18 +1319,18 @@
 		/// <summary>
 		/// Use relative path information
 		/// </summary>
-		bool   relativePathInfo = true;
+		bool relativePathInfo = true;

 		/// <summary>
 		/// Operate silently
 		/// </summary>
-		bool   silent;
+		bool silent;

 		/// <summary>
 		/// Use store rather than deflate when adding files, not likely to be used much
 		/// but it does exercise the option as the library supports it
 		/// </summary>
-		bool   useZipStored;
+		bool useZipStored;

 		/// <summary>
 		/// Restore file date and time to that stored in zip file on extraction
@@ -1330,7 +1340,7 @@
 		/// <summary>
 		/// Overwrite files handling
 		/// </summary>
-		Overwrite   overwriteFiles = Overwrite.Prompt;
+		Overwrite overwriteFiles = Overwrite.Prompt;

 		/// <summary>
 		/// Optional password for archive
@@ -1352,8 +1362,14 @@
 		/// </summary>
 		Operation operation = Operation.List;

+		/// <summary>
+		/// Flag indicating wether entry data should be included when testing.
+		/// </summary>
 		bool testData;

+		/// <summary>
+		/// stream used when creating archives.
+		/// </summary>
 		ZipOutputStream outputStream;

 		#endregion


Default ContextId to SessionId for unhandled exceptions handled by HttpModule

--- Mindscape.Raygun4Net/RaygunHttpModule.cs
+++ Mindscape.Raygun4Net/RaygunHttpModule.cs
@@ -15,6 +15,7 @@
     public void Init(HttpApplication context)
     {
       context.Error += SendError;
+
       HttpStatusCodesToExclude = RaygunSettings.Settings.ExcludedStatusCodes;
       ExcludeErrorsBasedOnHttpStatusCode = HttpStatusCodesToExclude.Any();
       ExcludeErrorsFromLocal = RaygunSettings.Settings.ExcludeErrorsFromLocal;
@@ -56,7 +57,19 @@
     protected RaygunClient GetRaygunClient(HttpApplication application)
     {
       var raygunApplication = application as IRaygunApplication;
-      return raygunApplication != null ? raygunApplication.GenerateRaygunClient() : new RaygunClient();
+      return raygunApplication != null ? raygunApplication.GenerateRaygunClient() : GenerateDefaultRaygunClient(application);
+    }
+
+    private RaygunClient GenerateDefaultRaygunClient(HttpApplication application)
+    {
+      var instance = new RaygunClient();
+
+      if (HttpContext.Current != null && HttpContext.Current.Session != null)
+      {
+        instance.ContextId = HttpContext.Current.Session.SessionID;
+      }
+
+      return instance;
     }

     protected bool CanSend(Exception exception)


Fixed a doc comment

Fixed a doc comment

--- MonoTouch.Dialog/DialogViewController.cs
+++ MonoTouch.Dialog/DialogViewController.cs
@@ -63,7 +63,7 @@
 			}
 		}

-		// If the value is 1, we are enabled, used in the source for quick computation
+		// If the value is true, we are enabled, used in the source for quick computation
 		bool enableSearch;
 		public bool EnableSearch {
 			get {
@@ -632,5 +632,4 @@
 			this.root = root;
 		}
 	}
-
 }


Add test for line recognition with span

Add test for line recognition with span

--- tests/SixLabors.Fonts.Tests/TextLayoutTests.cs
+++ tests/SixLabors.Fonts.Tests/TextLayoutTests.cs
@@ -346,6 +346,26 @@
             Assert.Equal(usedLines, count);
         }

+        [Fact]
+        public void CountLinesWithSpan()
+        {
+            Font font = CreateFont("hello\n!");
+
+            Span<char> text = stackalloc char[]
+            {
+                'h',
+                'e',
+                'l',
+                'l',
+                'o',
+                '\n',
+                '!'
+            };
+            int count = TextMeasurer.CountLines(text, new TextOptions(font) { Dpi = font.FontMetrics.ScaleFactor });
+
+            Assert.Equal(2, count);
+        }
+
         [Theory]
         [InlineData("This is a long and Honorificabilitudinitatibus califragilisticexpialidocious", 25, 7)]
         [InlineData("This is a long and Honorificabilitudinitatibus califragilisticexpialidocious", 50, 7)]


Gracefully handle COM exception errors trying to read shortcut links

--- MultiMiner.Win/WindowsStartupShortcut.cs
+++ MultiMiner.Win/WindowsStartupShortcut.cs
@@ -1,6 +1,7 @@
 using IWshRuntimeLibrary;
 using System;
 using System.IO;
+using System.Runtime.InteropServices;
 using System.Windows.Forms;

 namespace MultiMiner.Win
@@ -31,7 +32,15 @@
             Shell32.FolderItem folderItem = folder.ParseName(filenameOnly);
             if (folderItem != null)
             {
-                Shell32.ShellLinkObject link = (Shell32.ShellLinkObject)folderItem.GetLink;
+                Shell32.ShellLinkObject link = null;
+                try
+                {
+                    link = (Shell32.ShellLinkObject)folderItem.GetLink;
+                }
+                catch (COMException ex)
+                {
+                    return String.Empty; // reported by user
+                }
                 return link.Path;
             }


分页bug修复

分页bug修复

--- MyBlog.Web/Controllers/HomeController.cs
+++ MyBlog.Web/Controllers/HomeController.cs
@@ -42,35 +42,19 @@

         #region 首页

-        ///// <summary>
-        ///// 首页
-        ///// </summary>
-        ///// <param name="page"></param>
-        ///// <returns></returns>
-        //[HttpGet]
-        //public IActionResult Index(string page)
-        //{
-        //    return HomePage(page);
-        //}
-
         /// <summary>
         /// 首页
         /// </summary>
         /// <param name="page"></param>
         /// <returns></returns>
         [HttpGet("{page:int?}")]
-        public IActionResult List(int page)
+        public IActionResult List(int? page)
         {
-            return HomePage(page.ToString());
-        }
-
-        private IActionResult HomePage(string page)
-        {
-            if (!int.TryParse(page, out int pageNum))
+            if (!page.HasValue)
             {
-                pageNum = 1;
+                page = 1;
             }
-            var resModel = this._viewProjectionFactory.GetViewProjection<HomeBindModel, HomeViewModel>(new HomeBindModel() { PageNum = pageNum });
+            var resModel = this._viewProjectionFactory.GetViewProjection<HomeBindModel, HomeViewModel>(new HomeBindModel() { PageNum = page.Value });
             Set();
             return View("Index", resModel);
         }


Handle shader filenames that are invalid paths

* If shaders are compiled directly via D3DCompile, the source filename
  can be anything, not necessarily a valid path, so need to handle this
  case.

--- renderdocui/Windows/PipelineState/D3D11PipelineStateViewer.cs
+++ renderdocui/Windows/PipelineState/D3D11PipelineStateViewer.cs
@@ -222,8 +222,25 @@
                 shader.Text = stage.ShaderName;

             if (shaderDetails != null && shaderDetails.DebugInfo.entryFunc.Length > 0 && shaderDetails.DebugInfo.files.Length > 0)
-                shader.Text = shaderDetails.DebugInfo.entryFunc + "()" + " - " +
-                                Path.GetFileName(shaderDetails.DebugInfo.files[0].filename);
+            {
+                string shaderfn = "";
+
+                try
+                {
+                    shaderfn = Path.GetFileName(shaderDetails.DebugInfo.files[0].filename);
+                }
+                catch (ArgumentException)
+                {
+                    // invalid path or similar, just try to go from last \ or / onwards
+
+                    shaderfn = shaderDetails.DebugInfo.files[0].filename;
+                    int idx = shaderfn.LastIndexOfAny(new char[] { '/', '\\' });
+                    if (idx > 0)
+                        shaderfn = shaderfn.Substring(idx + 1);
+                }
+
+                shader.Text = shaderDetails.DebugInfo.entryFunc + "()" + " - " + shaderfn;
+            }

             int vs = 0;


Improved JSendClientTests to prevent AutoFixture from setting stubs/spies' public fields and leading to false positives

--- tests/JSend.Client.Tests/JSendClientTests.cs
+++ tests/JSend.Client.Tests/JSendClientTests.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Net.Http;
+using System.Reflection;
 using System.Threading;
 using System.Threading.Tasks;
 using FluentAssertions;
@@ -8,6 +9,7 @@
 using Moq;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
+using Ploeh.AutoFixture;
 using Ploeh.AutoFixture.Xunit;
 using Xunit;
 using Xunit.Extensions;
@@ -53,6 +55,18 @@
             }
         }

+        public class FrozenAsHttpClient : CustomizeAttribute
+        {
+            public override ICustomization GetCustomization(ParameterInfo parameter)
+            {
+                // Freezes a HttpClientStub/HttpClientSpy as HttpClient
+                // and prevents AutoFixture from setting their public fields
+                return new CompositeCustomization(
+                    new NoAutoPropertiesCustomization(parameter.ParameterType),
+                    new FreezingCustomization(parameter.ParameterType, typeof (HttpClient)));
+            }
+        }
+
         [Theory, JSendAutoData]
         public void ConstructorThrowsWhenClientIsNull(JSendClientSettings settings)
         {
@@ -124,7 +138,7 @@
         [Theory, JSendAutoData]
         public async Task GetAsync_ReturnsParsedResponse(
             HttpResponseMessage httpResponseMessage, JSendResponse<Model> parsedResponse,
-            [Frozen(As = typeof (HttpClient))] HttpClientStub clientStub,
+            [FrozenAsHttpClient] HttpClientStub clientStub,
             Uri uri, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -141,7 +155,7 @@

         [Theory, JSendAutoData]
         public async Task GetAsync_SendsGetRequest(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -153,7 +167,7 @@

         [Theory, JSendAutoData]
         public async Task GetAsync_SetsUri(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -166,7 +180,7 @@
         [Theory, JSendAutoData]
         public async Task GenericPostAsync_ReturnsParsedResponse(
             HttpResponseMessage httpResponseMessage, JSendResponse<Model> parsedResponse,
-            [Frozen(As = typeof (HttpClient))] HttpClientStub httpClientStub,
+            [FrozenAsHttpClient] HttpClientStub httpClientStub,
             Uri uri, Model content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -183,7 +197,7 @@

         [Theory, JSendAutoData]
         public async Task GenericPostAsync_SendsPostRequest(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -195,7 +209,7 @@

         [Theory, JSendAutoData]
         public async Task GenericPostAsync_SetsUri(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -207,7 +221,7 @@

         [Theory, JSendAutoData]
         public async Task GenericPostAsync_SerializesContent(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, Model content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -221,7 +235,7 @@

         [Theory, JSendAutoData]
         public async Task GenericPostAsync_SetsContentTypeHeader(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -233,7 +247,7 @@

         [Theory, JSendAutoData]
         public async Task GenericPostAsync_SetsCharSet(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -248,7 +262,7 @@
         [Theory, JSendAutoData]
         public async Task PostAsync_ReturnsParsedResponse(
             HttpResponseMessage httpResponseMessage, JSendResponse<JToken> parsedResponse,
-            [Frozen(As = typeof (HttpClient))] HttpClientStub httpClientStub,
+            [FrozenAsHttpClient] HttpClientStub httpClientStub,
             Uri uri, Model content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -265,7 +279,7 @@

         [Theory, JSendAutoData]
         public async Task PostAsync_SendsPostRequest(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -277,7 +291,7 @@

         [Theory, JSendAutoData]
         public async Task PostAsync_SetsUri(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -289,7 +303,7 @@

         [Theory, JSendAutoData]
         public async Task PostAsync_SerializesContent(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, Model content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -303,7 +317,7 @@

         [Theory, JSendAutoData]
         public async Task PostAsync_SetsContentTypeHeader(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -315,7 +329,7 @@

         [Theory, JSendAutoData]
         public async Task PostAsync_SetsCharSet(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -330,7 +344,7 @@
         [Theory, JSendAutoData]
         public async Task DeleteAsync_ReturnsParsedResponse(
             HttpResponseMessage httpResponseMessage, JSendResponse<JToken> parsedResponse,
-            [Frozen(As = typeof (HttpClient))] HttpClientStub httpClientStub,
+            [FrozenAsHttpClient] HttpClientStub httpClientStub,
             Uri uri, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -347,7 +361,7 @@

         [Theory, JSendAutoData]
         public async Task DeleteAsync_SendsPostRequest(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -359,7 +373,7 @@

         [Theory, JSendAutoData]
         public async Task DeleteAsync_SetsUri(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -372,7 +386,7 @@
         [Theory, JSendAutoData]
         public async Task GenericPutAsync_ReturnsParsedResponse(
             HttpResponseMessage httpResponseMessage, JSendResponse<Model> parsedResponse,
-            [Frozen(As = typeof (HttpClient))] HttpClientStub httpClientStub,
+            [FrozenAsHttpClient] HttpClientStub httpClientStub,
             Uri uri, Model content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -389,7 +403,7 @@

         [Theory, JSendAutoData]
         public async Task GenericPutAsync_SendsPutRequest(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -401,7 +415,7 @@

         [Theory, JSendAutoData]
         public async Task GenericPutAsync_SetsUri(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -413,7 +427,7 @@

         [Theory, JSendAutoData]
         public async Task GenericPutAsync_SerializesContent(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, Model content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -427,7 +441,7 @@

         [Theory, JSendAutoData]
         public async Task GenericPutAsync_SetsContentTypeHeader(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -439,7 +453,7 @@

         [Theory, JSendAutoData]
         public async Task GenericPutAsync_SetsCharSet(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -454,7 +468,7 @@
         [Theory, JSendAutoData]
         public async Task PutAsync_ReturnsParsedResponse(
             HttpResponseMessage httpResponseMessage, JSendResponse<JToken> parsedResponse,
-            [Frozen(As = typeof (HttpClient))] HttpClientStub httpClientStub,
+            [FrozenAsHttpClient] HttpClientStub httpClientStub,
             Uri uri, Model content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -471,7 +485,7 @@

         [Theory, JSendAutoData]
         public async Task PutAsync_SendsPutRequest(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -483,7 +497,7 @@

         [Theory, JSendAutoData]
         public async Task PutAsync_SetsUri(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -495,7 +509,7 @@

         [Theory, JSendAutoData]
         public async Task PutAsync_SerializesContent(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, Model content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -509,7 +523,7 @@

         [Theory, JSendAutoData]
         public async Task PutAsync_SetsContentTypeHeader(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Exercise system
@@ -521,7 +535,7 @@

         [Theory, JSendAutoData]
         public async Task PutAsync_SetsCharSet(
-            [Frozen(As = typeof (HttpClient))] HttpClientSpy httpClientSpy,
+            [FrozenAsHttpClient] HttpClientSpy httpClientSpy,
             Uri uri, object content, [Greedy] JSendClient client)
         {
             // Fixture setup
@@ -536,7 +550,7 @@
         [Theory, JSendAutoData]
         public async Task SendAsync_ReturnsParsedResponse(
             HttpResponseMessage httpResponseMessage, JSendResponse<Model> parsedResponse,
-            [Frozen(As = typeof (HttpClient))] HttpClientStub httpClientStub,
+            [FrozenAsHttpClient] HttpClientStub httpClientStub,
             HttpRequestMessage request, [Greedy] JSendClient client)
         {
             // Fixture setup


Silly test assertion order caused random timing failures

--- tests/MassTransit.Tests/JobConsumer_Specs.cs
+++ tests/MassTransit.Tests/JobConsumer_Specs.cs
@@ -112,16 +112,17 @@
                 Job = new { Duration = TimeSpan.FromSeconds(10) }
             });

+            Assert.That(await harness.Published.Any<JobStarted>(x => x.Context.Message.JobId == previousJobId), Is.True);
+
             response = await client.GetResponse<JobSubmissionAccepted>(new
             {
                 JobId = jobId,
                 Job = new { Duration = TimeSpan.FromSeconds(10) }
             });

+            Assert.That(await harness.Published.Any<JobSubmitted>(x => x.Context.Message.JobId == jobId), Is.True);
+
             Assert.That(response.Message.JobId, Is.EqualTo(jobId));
-
-            Assert.That(await harness.Published.Any<JobStarted>(x => x.Context.Message.JobId == previousJobId), Is.True);
-            Assert.That(await harness.Published.Any<JobSubmitted>(x => x.Context.Message.JobId == jobId), Is.True);

             Assert.That(await harness.Sent.Any<JobSlotUnavailable>(x => x.Context.Message.JobId == jobId), Is.True);


testing

testing

--- Cassandra.MSTest/Advanced.cs
+++ Cassandra.MSTest/Advanced.cs
@@ -43,6 +43,7 @@
             });
             builder.WithLoadBalancingPolicy(rp);
             builder.WithQueryTimeout(60 * 1000);
+            builder.WithAsyncCallTimeout(360 * 1000);

             CCMBridge.ReusableCCMCluster.Build(builder);
             Session = CCMBridge.ReusableCCMCluster.Connect("tester");
@@ -67,7 +68,7 @@

             Session.ChangeKeyspace(keyspaceName);

-            for (int KK = 0; KK < 10; KK++)
+            for (int KK = 0; KK < 1; KK++)
             {
                 Console.Write("Try no:" + KK);

@@ -207,7 +208,7 @@
                 , keyspaceName)));
             Session.ChangeKeyspace(keyspaceName);

-            for (int KK = 0; KK < 10; KK++)
+            for (int KK = 0; KK < 1; KK++)
             {
                 Console.Write("Try no:" + KK);


JwsHeader inherits from DynamicObject so you can add properties to it (to support the crit property)

--- CertManager/Jws/JwsHeader.cs
+++ CertManager/Jws/JwsHeader.cs
@@ -1,6 +1,8 @@
-namespace CertManager.Jws
+using System.Dynamic;
+
+namespace CertManager.Jws
 {
-    public class JwsHeader
+    public class JwsHeader : DynamicObject
     {
         /// <summary>
         /// Algorithm


Removed unused reference

Removed unused reference

--- Project.MyAnimeList/Project.MyAnimeList.Test/Tests/AccountMethodsAsyncTest.cs
+++ Project.MyAnimeList/Project.MyAnimeList.Test/Tests/AccountMethodsAsyncTest.cs
@@ -1,6 +1,5 @@
 using System.Net;
 using MyAnimeListSharp.Auth;
-using MyAnimeListSharp.Facade;
 using MyAnimeListSharp.Facade.Async;
 using Project.MyAnimeList.Test.Fixture;
 using Xunit;


Solved TODO.

Solved TODO.

--- ATZ.MVVM.ViewModels.Utility/Properties/AssemblyInfo.cs
+++ ATZ.MVVM.ViewModels.Utility/Properties/AssemblyInfo.cs
@@ -1,6 +1,5 @@
 using System.Reflection;
 using System.Runtime.InteropServices;
-//TODO: Public API documentation.

 // General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information


Add more components to client registerIgnore list (#746)

--- Content.Client/EntryPoint.cs
+++ Content.Client/EntryPoint.cs
@@ -132,7 +132,10 @@
                 "Pourable",
                 "Paper",
                 "Write",
-                "Bloodstream"
+                "Bloodstream",
+                "Mind",
+                "MovementSpeedModifier",
+                "StorageFill"
             };

             foreach (var ignoreName in registerIgnore)


fix(Interaction): ensure trigger collision check is done every frame

Previously, the `triggerIsColliding` bool was only set if an object
wasn't being touched which would cause the `StopTouching` method to
execute which caused problems with using objects.

This has now been fixed so the bool is set every `OnTriggerStay`
if no object is being touched or if the object being touched is the
same as the current touched object.

--- Assets/VRTK/Scripts/Interactions/VRTK_InteractTouch.cs
+++ Assets/VRTK/Scripts/Interactions/VRTK_InteractTouch.cs
@@ -295,9 +295,14 @@
         private void OnTriggerStay(Collider collider)
         {
             var colliderInteractableObject = TriggerStart(collider);
+
+            if (touchedObject == null || touchedObject == collider.gameObject)
+            {
+                triggerIsColliding = true;
+            }
+
             if (touchedObject == null && colliderInteractableObject && IsObjectInteractable(collider.gameObject))
             {
-                triggerIsColliding = true;
                 touchedObject = colliderInteractableObject;
                 var touchedObjectScript = touchedObject.GetComponent<VRTK_InteractableObject>();
                 var touchingObject = gameObject;


Cleans up some component errors from the console. (#1091)

--- Content.Server/EntryPoint.cs
+++ Content.Server/EntryPoint.cs
@@ -44,6 +44,7 @@
                 "AnimationsTest",
                 "ItemStatus",
                 "Marker",
+                "EmergencyLight",
             };

             foreach (var ignoreName in registerIgnore)


Fix crash when exporting empty database

Fix crash when exporting empty database

--- BTDB/KVDBLayer/Implementation/KeyValueDBTransaction.cs
+++ BTDB/KVDBLayer/Implementation/KeyValueDBTransaction.cs
@@ -403,7 +403,7 @@

         public uint GetUlongCount()
         {
-            return (uint)BtreeRoot.UlongsArray.Length;
+            return BtreeRoot.UlongsArray == null ? 0U : (uint)BtreeRoot.UlongsArray.Length;
         }

         string _descriptionForLeaks;


new information about article was added

new information about article was added

--- BibliographicSystem/Models/MicrosoftAcademicArticle.cs
+++ BibliographicSystem/Models/MicrosoftAcademicArticle.cs
@@ -4,9 +4,12 @@
 {
     public class MicrosoftAcademicArticle
     {
-        public string PaperTitle { get; set; }
-        public int PaperYear { get; set; }
+        public string Title { get; set; }
+        public string Description { get; set; }
+        public int Year { get; set; }
         public int CitationCount { get; set; }
+        public string ExtendedMetadata { get; set; }
+        public List<string> References { get; set; }
         public List<Author> Authors { get; set; }
     }


JournalMonitor: updated logging with fluent syntax

--- Controller/JournalMonitor.cs
+++ Controller/JournalMonitor.cs
@@ -2,6 +2,7 @@
 using System.IO;
 using DW.ELA.Interfaces;
 using NLog;
+using NLog.Fluent;
 using System.Linq;
 using System.Timers;
 using System.Threading.Tasks;
@@ -49,7 +50,7 @@
             filePosition = new FileInfo(CurrentFile).Length;
             SendEventsFromJournal(false);
             fileWatcher.EnableRaisingEvents = true;
-            logger.Info("Started monitoring on folder {0}", LogDirectory);
+            logger.Info("Started monitoring");
         }

         private void FileWatcher_Event(object sender, FileSystemEventArgs e)
@@ -70,7 +71,11 @@
             }
             catch (Exception e)
             {
-                logger.Error(e, "Error while reading event file {0}", fullPath);
+                logger.Error()
+                    .Message("Error while reading event file")
+                    .Exception(e)
+                    .Property("event-file", fullPath)
+                    .Write();
             }
         }

@@ -95,7 +100,11 @@
                 }
                 catch (Exception e)
                 {
-                    logger.Error(e, "Error while reading journal file {0}", CurrentFile);
+                    logger.Error()
+                        .Message("Error while reading journal file")
+                        .Exception(e)
+                        .Property("journal-file", CurrentFile)
+                        .Write();
                     filePosition = new FileInfo(CurrentFile).Length; // Skipping the 'poisoned' data
                 }
         }


add HttpRequest to >=.net4.0

add HttpRequest to >=.net4.0

--- Bootstrap.Pagination.net40/HttpRequestBaseExtension.cs
+++ Bootstrap.Pagination.net40/HttpRequestBaseExtension.cs
@@ -45,6 +45,16 @@
 #elif NET30 || NET20
         public static string QueryString(HttpRequest request, string key)
 #else
+        public static string QueryString(this HttpRequest request, string key)
+        {
+            return request.QueryString[key];
+        }
+        /// <summary>
+        ///     由key查询string
+        /// </summary>
+        /// <param name="request"></param>
+        /// <param name="key"></param>
+        /// <returns></returns>
         public static string QueryString(this HttpRequestBase request, string key)
 #endif
         {
@@ -62,6 +72,22 @@
 #elif NET30 || NET20
         public static int QueryInt32(HttpRequest request, string key, int defaultValue = 1)
 #else
+        public static int QueryInt32(this HttpRequest request, string key, int defaultValue = 1)
+        {
+            if (string.IsNullOrEmpty(key))
+            {
+                return defaultValue;
+            }
+            int result;
+            return int.TryParse(request.QueryString[key], out result) ? result : defaultValue;
+        }
+        /// <summary>
+        ///     由key查询int，如果为空，或者无效，返回指定的默认值，或者1
+        /// </summary>
+        /// <param name="request"></param>
+        /// <param name="key"></param>
+        /// <param name="defaultValue"></param>
+        /// <returns></returns>
         public static int QueryInt32(this HttpRequestBase request, string key, int defaultValue = 1)
 #endif
         {


corrected typo in comment

corrected typo in comment

--- BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
+++ BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
@@ -94,7 +94,7 @@
 // 2015-05-18 2015.0.120.12 second attempt at integrating version compatibility extension methods by Magson Leone
 // 2015-05-19 2015.0.120.13 third version of version compatibility extension methods by Magson Leone
 // 2015-05-20 2016.0.120.0 first successful compilation for the Revit 2016 API
-// 2015-05-26 2016.0.120.1 updated BcSample.txt for Revit 2016 and implemented Util.Intersection method
+// 2015-05-26 2016.0.120.1 updated BcSamples.txt for Revit 2016 and implemented Util.Intersection method
 //
 [assembly: AssemblyVersion( "2016.0.120.1" )]
 [assembly: AssemblyFileVersion( "2016.0.120.1" )]


--- BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
+++ BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
@@ -370,6 +370,8 @@
 // 2021-04-08 2021.0.150.24 translated TransformPickPointToScreen from VB.NET to C# for https://forums.autodesk.com/t5/revit-api-forum/finding-distance-between-points-in-multiple-views/m-p/10217818
 // 2021-04-19 2021.0.150.25 integrated `CmdSortCurveLoops` by @stenci from pull request #16 implementing SortCurveLoops that works on curved faces
 // 2021-04-19 2022.0.150.0 flat migration to Revit 2022
+// 2021-04-19 2022.0.150.1 fixed some deprecated API usage warnings
+// 2021-04-19 2022.0.150.2 fixed some more deprecated API usage warnings
 //
-[assembly: AssemblyVersion( "2022.0.150.0" )]
-[assembly: AssemblyFileVersion( "2022.0.150.0" )]
+[assembly: AssemblyVersion( "2022.0.150.2" )]
+[assembly: AssemblyFileVersion( "2022.0.150.2" )]


Added ParentId to page interface. Fixes #398

--- Core/Piranha/Models/IPage.cs
+++ Core/Piranha/Models/IPage.cs
@@ -34,6 +34,11 @@
 		/// Gets/sets the group needed to view the page.
 		/// </summary>
 		Guid GroupId { get; }
+
+		/// <summary>
+		/// Gets/sets the parent id.
+		/// </summary>
+		Guid ParentId { get; }

 		/// <summary>
 		/// Gets/sets the title.


Support for DateTimeOffset from OrdinalCommand

--- CassandraSharp/CQLBinaryProtocol/ValueSerialization.cs
+++ CassandraSharp/CQLBinaryProtocol/ValueSerialization.cs
@@ -207,7 +207,12 @@
                     break;

                 case ColumnType.Timestamp:
-                    rawData = ((DateTime)data).GetBytes();
+                    if( data is DateTime )
+                        rawData = ((DateTime)data).GetBytes();
+                    else if( data is DateTimeOffset )
+                        rawData = ((DateTimeOffset)data).DateTime.GetBytes();
+                    else
+                        throw new ArgumentException("Unsupport timestamp type");
                     break;

                 case ColumnType.Bigint:


Removed remaining file

Removed remaining file

--- CloudBuilderLibrary/HighLevel/Cotc.AotCompilerHints.cs
+++ CloudBuilderLibrary/HighLevel/Cotc.AotCompilerHints.cs
@@ -1,39 +0,0 @@
-using System;
-
-namespace CotcSdk {
-
-#if UNITY_IPHONE
-	public static partial class Cotc {
-		// Required because of issues on iOS (AOT compilation)
-		static Cotc() {
-			new List<PromiseHandler<AchievementDefinition>>();
-			new List<PromiseHandler<Bundle>>();
-			new List<PromiseHandler<byte[]>>();
-			new List<PromiseHandler<Cloud>>();
-			new List<PromiseHandler<Dictionary<string, AchievementDefinition>>>();
-			new List<PromiseHandler<Dictionary<string, Score>>>();
-			new List<PromiseHandler<Done>>();
-			new List<PromiseHandler<DrawnItemsResult>>();
-			new List<PromiseHandler<Exception>>();
-			new List<PromiseHandler<Gamer>>();
-			new List<PromiseHandler<GamerInfo>>();
-			new List<PromiseHandler<GamerProfile>>();
-			new List<PromiseHandler<IndexResult>>();
-			new List<PromiseHandler<IndexSearchResult>>();
-			new List<PromiseHandler<int>>();
-			new List<PromiseHandler<List<GamerInfo>>>();
-			new List<PromiseHandler<List<Score>>>();
-			new List<PromiseHandler<Match>>();
-			new List<PromiseHandler<PagedList<MatchListResult>>>();
-			new List<PromiseHandler<PagedList<Score>>>();
-			new List<PromiseHandler<PagedList<Transaction>>>();
-			new List<PromiseHandler<PagedList<UserInfo>>>();
-			new List<PromiseHandler<PostedGameScore>>();
-			new List<PromiseHandler<SocialNetworkFriendResponse>>();
-			new List<PromiseHandler<string>>();
-			new List<PromiseHandler<TransactionResult>>();
-		}
-	}
-#endif
-}
-


1230: GLBitmap ctor

1230: GLBitmap ctor

--- a_mini/projects/PixelFarm/PixelFarm.DrawingGL/DrawingGL/GLTexture/GLBitmap.cs
+++ a_mini/projects/PixelFarm/PixelFarm.DrawingGL/DrawingGL/GLTexture/GLBitmap.cs
@@ -13,7 +13,7 @@
         public abstract bool IsInvert { get; }
     }

-    public class GLBitmap : PixelFarm.Drawing.Image
+    public class GLBitmap : PixelFarm.Drawing.Image
     {
         int textureId;
         int width;
@@ -21,7 +21,7 @@
         byte[] rawBuffer;
         int[] rawIntBuffer;
         PixelFarm.Drawing.Imaging.NativeImage bmp;
-
+        IntPtr nativeImgMem;
         LazyBitmapBufferProvider lazyProvider;
         bool isInvertImage = false;
         static readonly bool isLittleEndian;
@@ -49,6 +49,12 @@
             this.height = bmp.Height;
             this.bmp = bmp;
             this.isInvertImage = isInvertImage;
+        }
+        public GLBitmap(int w, int h, IntPtr nativeImgMem)
+        {
+            this.width = w;
+            this.height = h;
+            this.nativeImgMem = nativeImgMem;
         }
         internal GLBitmap(LazyBitmapBufferProvider lazyProvider)
         {
@@ -103,7 +109,14 @@
                 GL.GenTextures(1, out this.textureId);
                 //bind
                 GL.BindTexture(TextureTarget.Texture2D, this.textureId);
-                if (this.rawBuffer != null)
+                if (nativeImgMem != IntPtr.Zero)
+                {
+                    GL.TexImage2D(TextureTarget.Texture2D, 0,
+                          PixelInternalFormat.Rgba, this.width, this.height, 0,
+                          PixelFormat.Rgba, //
+                          PixelType.UnsignedByte, nativeImgMem);
+                }
+                else if (this.rawBuffer != null)
                 {
                     unsafe
                     {
@@ -156,7 +169,7 @@

             return this.textureId;
         }
-
+
         public override void Dispose()
         {
             GL.DeleteTextures(1, ref textureId);


Minor Search button UI change

Minor Search button UI change

--- AirlineServices/AirlineServices/Views/Home/Index.cshtml
+++ AirlineServices/AirlineServices/Views/Home/Index.cshtml
@@ -6,7 +6,7 @@

Airline Services

Solving all your flight and passenger management pains!

-
Search Flights »

+
Search Flights


SendMessage can use variable

SendMessage can use variable

--- Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs
+++ Assets/Fungus/Flowchart/Scripts/Commands/SendMessage.cs
@@ -1,4 +1,5 @@
 using UnityEngine;
+using UnityEngine.Serialization;
 using System.Collections;

 namespace Fungus
@@ -7,8 +8,12 @@
 	             "Send Message",
 	             "Sends a message to either the owner Flowchart or all Flowcharts in the scene. Blocks can listen for this message using a Message Received event handler.")]
 	[AddComponentMenu("")]
-	public class SendMessage : Command
+	public class SendMessage : Command, ISerializationCallbackReceiver
 	{
+		#region Obsolete Properties
+		[HideInInspector] [FormerlySerializedAs("message")] public string messageOLD;
+		#endregion
+
 		public enum MessageTarget
 		{
 			SameFlowchart,
@@ -19,11 +24,11 @@
 		public MessageTarget messageTarget;

 		[Tooltip("Name of the message to send")]
-		public string message = "";
+		public StringData _message = new StringData("");

 		public override void OnEnter()
 		{
-			if (message.Length == 0)
+			if (_message.Value.Length == 0)
 			{
 				Continue();
 				return;
@@ -45,7 +50,7 @@
 			{
 				foreach (MessageReceived receiver in receivers)
 				{
-					receiver.OnSendFungusMessage(message);
+					receiver.OnSendFungusMessage(_message);
 				}
 			}

@@ -54,18 +59,34 @@

 		public override string GetSummary()
 		{
-			if (message.Length == 0)
+			if (_message.Value.Length == 0)
 			{
 				return "Error: No message specified";
 			}

-			return message;
+			return _message;
 		}

 		public override Color GetButtonColor()
 		{
 			return new Color32(235, 191, 217, 255);
 		}
+
+		//
+		// ISerializationCallbackReceiver implementation
+		//
+
+		public virtual void OnBeforeSerialize()
+		{}
+
+		public virtual void OnAfterDeserialize()
+		{
+			if (messageOLD != default(string))
+			{
+				_message.Value = messageOLD;
+				messageOLD = default(string);
+			}
+		}
 	}

 }


add debugging

add debugging

--- Assets/HappyFunTimes/HappyFunTimesCore/PlayerSpawner.cs
+++ Assets/HappyFunTimes/HappyFunTimesCore/PlayerSpawner.cs
@@ -98,6 +98,7 @@
         {
             if (!m_started)
             {
+                m_log.Info("Starting HappyFunTimes");
                 m_started = true;
                 enabled = true;
                 m_connectionManager.StartHappyFunTimes();


IL2CPP test

IL2CPP test

--- Assets/Scripts/RuntimeUnitTestToolkit/UnitTestRunner.cs
+++ Assets/Scripts/RuntimeUnitTestToolkit/UnitTestRunner.cs
@@ -38,7 +38,11 @@
         public static void RegisterAllMethods<T>()
             where T : new()
         {
+            try
+            {
+            // test, only new
             var test = new T();
+            /*
             var methods = typeof(T).GetMethods(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
             foreach (var item in methods)
             {
@@ -54,6 +58,12 @@
                     var invoke = (Action)Delegate.CreateDelegate(typeof(Action), test, item);
                     AddTest(invoke);
                 }
+            }
+            */
+            }
+            catch
+            {
+                // LogException...
             }
         }
     }
@@ -280,4 +290,4 @@
             }
         }
     }
-}+}


simple event hub demo - adjust user experience

--- AzureEventHub/AzureEventHub.UI/Panel/PanelDemoSimple.cs
+++ AzureEventHub/AzureEventHub.UI/Panel/PanelDemoSimple.cs
@@ -30,6 +30,8 @@
 			}

 			new Thread(async () => { await _messageService.SendMessage(message); }).Start();
+
+			tbMessage.Clear();
 		}

 		private void button1_Click(object sender, EventArgs e)


Better handle distinct email address sending

--- Battery-Commander.Web/Jobs/EvaluationStatusChangeJob.cs
+++ Battery-Commander.Web/Jobs/EvaluationStatusChangeJob.cs
@@ -52,7 +52,7 @@

                 var recipients =
                     Get_Recipients(evaluation)
-                    .Distinct()
+                    .Distinct(new EmailComparer { })
                     .ToList();

                 emailSvc
@@ -63,6 +63,16 @@
                     .SendWithErrorCheck()
                     .Wait();
             }
+        }
+
+        private class EmailComparer : IEqualityComparer<Address>
+        {
+            public bool Equals(Address x, Address y)
+            {
+                return String.Equals(x.EmailAddress, y.EmailAddress, StringComparison.CurrentCultureIgnoreCase);
+            }
+
+            public int GetHashCode(Address obj) => obj.GetHashCode();
         }

         public IEnumerable<Address> Get_Recipients(Evaluation evaluation)


update

update

--- CSharpGL/Renderers/BezierRenderers/EvaluatorRenderer.cs
+++ CSharpGL/Renderers/BezierRenderers/EvaluatorRenderer.cs
@@ -45,7 +45,7 @@
             // TODO: not needed. Why?
             //this.WorldPosition = box.MaxPosition / 2 + box.MinPosition / 2;

-            this.CurveWidth = new LineWidthSwitch(3.0f);
+            this.CurveWidth = new LineWidthSwitch(2.0f);
             this.CurveColor = Color.Red;
         }


fix edit course

fix edit course

--- ContosoUniversity.Web/Controllers/CoursesController.cs
+++ ContosoUniversity.Web/Controllers/CoursesController.cs
@@ -8,6 +8,7 @@
 using ContosoUniversity.Common.Interfaces;
 using ContosoUniversity.Common;
 using ContosoUniversity.Data.DbContexts;
+using System.Collections.Generic;

 namespace ContosoUniversity.Web.Controllers
 {
@@ -60,7 +61,7 @@
             var departmentsQuery = from d in _departmentRepo.GetAll()
                                    orderby d.Name
                                    select d;
-            ViewBag.DepartmentID = new SelectList(departmentsQuery.AsNoTracking(), "DepartmentID", "Name", selectedDepartment);
+            ViewBag.DepartmentID = new SelectList(departmentsQuery.AsNoTracking(), "ID", "Name", selectedDepartment);
         }

         [HttpPost]


remove unused test class

remove unused test class

--- Cqrs.Portable.Tests/Envelope/EnvelopeDispatcherTest.cs
+++ Cqrs.Portable.Tests/Envelope/EnvelopeDispatcherTest.cs
@@ -125,13 +125,4 @@
             Envelope = envelope;
         }
     }
-
-    public class TestCommand : ICommand
-    { }
-
-    public class TestFuncCommand : IFuncCommand
-    { }
-
-    public class TestFuncEvent : IFuncEvent
-    { }
 }


Revise mouse hit and active cursor

Revise mouse hit and active cursor

--- CustomWidgets/ResizeContainer/BottomResizeContainer.cs
+++ CustomWidgets/ResizeContainer/BottomResizeContainer.cs
@@ -45,7 +45,6 @@
 			: base (FlowDirection.TopToBottom)
 		{
 			this.HAnchor = HAnchor.Absolute;
-			this.Cursor = Cursors.HSplit;
 			this.SplitterHeight = theme.SplitterWidth;
 			this.SpliterBarColor = theme.SplitterBackground;
 		}
@@ -80,7 +79,8 @@

 		public override void OnMouseDown(MouseEventArgs mouseEvent)
 		{
-			if (mouseEvent.Position.Y < this.SplitterHeight)
+			if (mouseEvent.Position.Y <= this.LocalBounds.Bottom + this.SplitterHeight
+				&& mouseEvent.Position.Y >= this.LocalBounds.Bottom)
 			{
 				mouseDownOnBar = true;
 				mouseDownY = TransformToScreenSpace(mouseEvent.Position).Y;
@@ -99,6 +99,26 @@
 					Height = downHeight + mouseDownY - currentMouseY;
 				});
 			}
+
+			var currentCursor = this.Cursor;
+
+			if (mouseEvent.Position.Y <= this.LocalBounds.Bottom + this.SplitterHeight
+				&& mouseEvent.Position.Y >= this.LocalBounds.Bottom)
+			{
+				this.Cursor = Cursors.HSplit;
+
+			}
+			else
+			{
+				this.Cursor = Cursors.Default;
+			}
+
+			if (this.FirstWidgetUnderMouse
+				&& this.Cursor != currentCursor)
+			{
+				this.SetCursor(this.Cursor);
+			}
+
 			base.OnMouseMove(mouseEvent);
 		}


Remoted flattening of AggregateExceptions

--- ConDep.Dsl/SemanticModel/ConDepConfigurationExecutor.cs
+++ ConDep.Dsl/SemanticModel/ConDepConfigurationExecutor.cs
@@ -94,9 +94,8 @@
             }
             catch (AggregateException aggEx)
             {
-                var flattenEx = aggEx.Flatten();
                 Logger.Error("ConDep execution failed with the following error(s):");
-                foreach (var ex in flattenEx.InnerExceptions)
+                foreach (var ex in aggEx.InnerExceptions)
                 {
                     Logger.Error("ConDep execution failed.", ex);
                 }


Kein Unterstrich vor der Zeitzone im Dateinamen.

--- Datengenerator/Datengenerator/Loggen/StringExtension.cs
+++ Datengenerator/Datengenerator/Loggen/StringExtension.cs
@@ -9,7 +9,7 @@
         {
             return string.Concat(
                 Path.GetFileNameWithoutExtension(dateiname),
-                    DateTime.Now.ToString("yyyy-MM-dd_HHmmss_z"),
+                    DateTime.Now.ToString("yyyy-MM-dd_HHmmssz"),
                     Path.GetExtension(dateiname)
                 );
         }


Add "Terraformable" to info text if terraformable

--- EDDiscovery/EliteDangerous/JournalEvents/JournalScan.cs
+++ EDDiscovery/EliteDangerous/JournalEvents/JournalScan.cs
@@ -250,7 +250,7 @@
                 if (g.HasValue)
                     g = g / 9.8;

-                info = Tools.FieldBuilder("", PlanetClass, "Mass:;EM;0.00", nMassEM, "< ;Landable", IsLandable, "", Atmosphere, "Gravity:;G;0.0", g, "Radius:;km;0", r);
+                info = Tools.FieldBuilder("", PlanetClass, "Mass:;EM;0.00", nMassEM, "< ;Landable", IsLandable, "< ;Terraformable", TerraformState == "Terraformable", "", Atmosphere, "Gravity:;G;0.0", g, "Radius:;km;0", r);
             }

             detailed = DisplayString(0, false);


Made loading slightly faster

Made loading slightly faster

--- ExamAssessmentSOAPAPI/ExamassessmentWCF/Service1.svc.cs
+++ ExamAssessmentSOAPAPI/ExamassessmentWCF/Service1.svc.cs
@@ -145,12 +145,10 @@
         }
        public ExamTemplate getExamTemplate(String id)
         {
-         //   List<ExamTemplate> getResults = new List<ExamTemplate>();
            var result = from TempExamTemplate in db.FullExamTemplateInfo
                          where TempExamTemplate.ExamTemplateID == id
                          select TempExamTemplate;
-           // return result.First().ExamTemplateID.First();
-           // return result.;
+

             var ExamTemplate = from TempExamTemplate in db.ExamTemplate
                                where TempExamTemplate.ExamTemplateID == id
@@ -176,9 +174,14 @@
             }
             else
             {
-               for(int i = 0; i < ExamQuestions.Count(); i++)
+                var dbExamQuestion = db.ExamQuestion.ToList();
+                var dbExamQuestionList = db.ExamQuestionList.ToList();
+                var dbQuestionAnswers = db.QuestionAnswers.ToList();
+                var dbquestion = db.Question.ToList();
+                var dbanswer = db.Answer.ToList();
+                for (int i = 0; i < ExamQuestions.Count(); i++)
                 {
-                    var ExamQuestion = (from TempQuest in db.ExamQuestion.ToList()
+                    var ExamQuestion = (from TempQuest in dbExamQuestion
                                         where TempQuest.ExamQuestionID == ExamQuestions.ToList().ElementAt(i)
                                         select TempQuest);

@@ -192,25 +195,26 @@
                     ExamQ.PKID = ExamQuestion.FirstOrDefault().PKID;
                     ExamQ.QuestionType.PKID = 1;//ExamQuestion.FirstOrDefault().QuestionType.PKID;
                     ExamQ.QuestionType.QuestionTypeName = ExamQuestion.FirstOrDefault().QuestionType.QuestionTypeName;
-                    var ExamQuestionList = from TempQuestion in db.ExamQuestionList
+
+                    var ExamQuestionList = from TempQuestion in dbExamQuestionList
                                    where TempQuestion.ExamQuestionID == ExamQ.ExamQuestionID
                                    select TempQuestion;
                     for(int j= 0; j < ExamQuestionList.ToList().Count(); j++)
                     {
                         int tempID = ExamQuestionList.ToList().ElementAt(j).QuestionID;
-                        var Question = from TempQuestion in db.Question
+                        var Question = from TempQuestion in dbquestion
                                        where TempQuestion.PKID == tempID
                                        select TempQuestion;
                         Question quest = new Question();
                         quest.PKID = Question.FirstOrDefault().PKID;
                         quest.Description = Question.FirstOrDefault().Description;
-                        var AnswersID = from QuestionAnswers in db.QuestionAnswers
+                        var AnswersID = from QuestionAnswers in dbQuestionAnswers
                                         where QuestionAnswers.QuestionID == quest.PKID
                                         select QuestionAnswers;
                         for(int k = 0;  k < AnswersID.ToList().Count(); k++)
                         {
                             int answer = AnswersID.ToList().ToArray()[k].AnswerID;
-                            var TheAnswer = from tempAnswer in db.Answer
+                            var TheAnswer = from tempAnswer in dbanswer
                                             where tempAnswer.PKID == answer
                                             select tempAnswer;
                             Answers ans = new Answers();


commit

commit

--- ExamAssessmentSOAPAPI/ExamassessmentWCF/Service1.svc.cs
+++ ExamAssessmentSOAPAPI/ExamassessmentWCF/Service1.svc.cs
@@ -68,8 +68,10 @@
                 var second = from x in db.QuestionAnswers
                              where x.QuestionID == quest.PKID
                              select x;
-                for(int j=0; j < second.Count(); j++)
+                quest.Answers.ToList().AddRange((GetAnswersQuestion(quest.PKID).ToList()));
+                /*for(int j=0; j < second.Count(); j++)
                 {
+
                     var temp = second.ToList().ElementAt(j).AnswerID;
                     var third = from answer in db.Answer
                                 where answer.PKID == temp
@@ -84,7 +86,8 @@
                         quest.Answers.Add(ans);
                         result.Add(quest);
                     }
-                }
+                }*/
+                result.Add(quest);
             }
             return result;
         }