Update Program.cs

Update Program.cs

--- BlobStorage/Program.cs
+++ BlobStorage/Program.cs
@@ -96,7 +96,7 @@
             // 创建一个blobClient来和blob服务交互。
             CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();

-            // 创建一个容器来组织存储账号下的blobs。
+            // 创建一个容器来组织存储账号下的blob。
             Console.WriteLine("1. 创建容器...");
             CloudBlobContainer container = blobClient.GetContainerReference(blockBlobContainerName);
             try
@@ -113,7 +113,7 @@
             // 我们有两个选择去查看已经上传的blob
             // 1) 使用共享访问签名(SAS)来委托访问资源。更多详细内容请阅读上面提供的关于SAS的文档。
             // 2) 公开容器下blobs的访问权限。取消下面代码的注释可以达到此目的。通过这样的设置我们可以使用下面的链接访问之前上传的图片
-            // https://[InsertYourStorageAccountNameHere].blob.core.chinacloudapi.cn/democontainer/HelloWorld.png
+            // https://[存储账号].blob.core.chinacloudapi.cn/democontainer/HelloWorld.png

             // await container.SetPermissionsAsync(new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Blob });

@@ -155,7 +155,7 @@
             const string imageToUpload = "HelloWorld.png";
             string blockBlobContainerName = "demoblockblobcontainer-" + Guid.NewGuid();

-            // 调用GetAccountSASToken 来获得基于存储账号、存储密匙的sasToken
+            // 调用GetAccountSASToken 来获得基于存储账号、存储密钥的sasToken
             string sasToken = GetAccountSASToken();

             // 通过SASToken创建AccountSAS
@@ -167,7 +167,7 @@
             Console.WriteLine("账户SAS的令牌: " + accountSAS.SASToken);
             Console.WriteLine();

-            // 创建一个容器来组织存储账号下的blobs
+            // 创建一个容器来组织存储账号下的blob
             Console.WriteLine("1. 使用账户SAS创建容器");

             // 通过传递存储账号和容器名来获得容器的Uri
@@ -190,7 +190,7 @@
             // 我们有两个选择去查看已经上传的blob
             // 1) 使用共享访问签名(SAS)来委托访问资源。更多详细内容请阅读上面提供的关于SAS的文档。
             // 2) 公开容器下blobs的访问权限。取消下面代码的注释可以达到此目的。通过这样的设置我们可以使用下面的链接访问之前上传的图片
-            // https://[InsertYourStorageAccountNameHere].blob.core.chinacloudapi.cn/democontainer/HelloWorld.png
+            // https://[存储账号].blob.core.chinacloudapi.cn/democontainer/HelloWorld.png

             // await container.SetPermissionsAsync(new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Blob });

@@ -199,7 +199,7 @@
             CloudBlockBlob blockBlob = container.GetBlockBlobReference(imageToUpload);
             await blockBlob.UploadFromFileAsync(imageToUpload, FileMode.Open);

-            // 列出容器内所有的blobs
+            // 列出容器内所有的blob
             Console.WriteLine("3. 列出容器内所有的blobs");
             foreach (IListBlobItem blob in container.ListBlobs())
             {
@@ -257,7 +257,7 @@
             random.NextBytes(samplePagedata);
             await pageBlob.UploadFromByteArrayAsync(samplePagedata, 0, samplePagedata.Length);

-            // 列出容器内的所有的blobs。因为一个容器包含很多的blobs，页blob的返回结果可能会包含多个段，每个段最大可能有5000个blobs。
+            // 列出容器内的所有的blobs。因为一个容器包含很多的blob，页blob的返回结果可能会包含多个段，每个段最大可能有5000个blob。
             // 你可以通过ListBlobsSegmentedAsync方法的参数maxResults定义一个更小的尺寸
             Console.WriteLine("3. 列出容器内的Blobs");
             BlobContinuationToken token = null;
@@ -273,7 +273,7 @@
             } while (token != null);

             // 从页blob中读取数据
-            // Console.WriteLine("4. Read from a Page Blob");
+            // Console.WriteLine("4. 从页blob中读取数据");
             int bytesRead = await pageBlob.DownloadRangeToByteArrayAsync(samplePagedata, 0, 0, samplePagedata.Count());

             // 示例后的一些清除工作


不要になったもの・消し忘れを削除

不要になったもの・消し忘れを削除

--- Browser/FormBrowser.cs
+++ Browser/FormBrowser.cs
@@ -574,7 +574,7 @@
 		private async Task<Bitmap> TakeScreenShot()
 		{
 			var kancolleFrame = GetKanColleFrame();
-			if(kancolleFrame == null)
+			if (kancolleFrame == null)
 			{
 				AddLog(3, string.Format("艦これが読み込まれていないため、スクリーンショットを撮ることはできません。"));
 				System.Media.SystemSounds.Beep.Play();
@@ -588,7 +588,7 @@

 				if (Browser == null || !Browser.IsBrowserInitialized)
 					return request.TaskSource.Task;
-
+

 				string script = $@"
 (async function()
@@ -613,30 +613,12 @@
 			var result = await InternalTakeScreenShot();

 			// ごみ掃除
-			Browser.JavascriptObjectRepository.UnRegister(result.ID).ToString();
+			Browser.JavascriptObjectRepository.UnRegister(result.ID);
 			kancolleFrame.ExecuteJavaScriptAsync($@"delete {result.ID}");

 			return result.GetImage();
 		}

-
-		/// <summary>
-		/// ブラウザ画面のハードコピーを取得します。
-		/// TakeScreenShot で SS が撮れない環境 (WebGL && preserveDrawingBuffer=false) で使用します。
-		/// </summary>
-		private Task<Bitmap> TakeHardScreenShot()
-		{
-			// スタイルシートが適用されていると仮定する
-
-			var bmp = new Bitmap(Browser.Width, Browser.Height, PixelFormat.Format24bppRgb);
-			using (var g = Graphics.FromImage(bmp))
-			{
-				g.CopyFromScreen(Browser.PointToScreen(Browser.Location), new Point(0, 0), Browser.Size);
-			}
-
-			// 同期処理でもいいが、TakeScreenShot とシグネチャを合わせるため
-			return Task.FromResult(bmp);
-		}

 		/// <summary>
@@ -653,10 +635,6 @@
 			Bitmap image = null;
 			try
 			{
-				// なくても動くようになったので（？）
-				//if (Configuration.HardwareAccelerationEnabled && !Configuration.PreserveDrawingBuffer)
-				//	image = await TakeHardScreenShot();
-				//else
 				image = await TakeScreenShot();


support double * bool

support double * bool

--- primitives.cs
+++ primitives.cs
@@ -1512,6 +1512,9 @@
                 else if (x.GetType() == typeof(A<bool>) && y.GetType() == typeof(A<bool>)) {
                     return math((A<bool>)x, (A<bool>)y, (a, b) => ((a?1:0) * (b?1:0)) == 1 ? true : false);
                 }
+                else if (x.GetType() == typeof(A<double>) && y.GetType() == typeof(A<bool>)) {
+                    return mathmixed((A<double>)x, (A<bool>)y, (a, b) => (a * (b ? 1 : 0)));
+                }
                 else if (x.GetType() != y.GetType()) {
                     return mathmixed(x, y, (a, b) => a * b);
                 }


Removed the const restriction in the constructor to conversion operator pass.

--- src/Generator/Passes/ConstructorToConversionOperatorPass.cs
+++ src/Generator/Passes/ConstructorToConversionOperatorPass.cs
@@ -26,8 +26,6 @@
             if (!parameterType.IsReference)
                 return false;
             var qualifiedPointee = parameterType.QualifiedPointee;
-            if (!qualifiedPointee.Qualifiers.IsConst)
-                return false;
             Class castFromClass;
             if (!qualifiedPointee.Type.IsTagDecl(out castFromClass))
                 return false;


add ctor for testing

add ctor for testing

--- src/IdentityServer4/Models/Messages/AuthorizationRequest.cs
+++ src/IdentityServer4/Models/Messages/AuthorizationRequest.cs
@@ -101,42 +101,23 @@
         /// <summary>
         /// Initializes a new instance of the <see cref="AuthorizationRequest"/> class.
         /// </summary>
+        public AuthorizationRequest()
+        {
+            // public for testing
+            Parameters = new NameValueCollection();
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="AuthorizationRequest"/> class.
+        /// </summary>
         internal AuthorizationRequest(ValidatedAuthorizeRequest request)
         {
-            // let the login page know the client requesting authorization
             ClientId = request.ClientId;
-
-            // pass through display mode to signin service
-            if (request.DisplayMode.IsPresent())
-            {
-                DisplayMode = request.DisplayMode;
-            }
-
-            // pass through ui locales to signin service
-            if (request.UiLocales.IsPresent())
-            {
-                UiLocales = request.UiLocales;
-            }
-
-            // pass through login_hint
-            if (request.LoginHint.IsPresent())
-            {
-                LoginHint = request.LoginHint;
-            }
-
-            // look for well-known acr value -- idp
-            var idp = request.GetIdP();
-            if (idp.IsPresent())
-            {
-                IdP = idp;
-            }
-
-            // look for well-known acr value -- tenant
-            var tenant = request.GetTenant();
-            if (tenant.IsPresent())
-            {
-                Tenant = tenant;
-            }
+            DisplayMode = request.DisplayMode;
+            UiLocales = request.UiLocales;
+            LoginHint = request.LoginHint;
+            IdP = request.GetIdP();
+            Tenant = request.GetTenant();

             // process acr values
             var acrValues = request.GetAcrValues();


Fix to respect NONATIVEHASH in Crypto.Hashes.cs.

NONATIVEHASH was not respected everywhere, causing the project to fail unexpectedly in a target platform (Blazor wasm) where System.Security.Cryptography is not supported.

Added a missing overload for HMACSHA512, and some small fixes to restore the build.

--- NBitcoin/Crypto/Hashes.cs
+++ NBitcoin/Crypto/Hashes.cs
@@ -1,4 +1,4 @@
-#if !NO_BC
+#if !NO_BC
 using NBitcoin.BouncyCastle.Crypto.Parameters;
 using NBitcoin.BouncyCastle.Security;
 #endif
@@ -671,7 +671,7 @@

 		public static byte[] SHA256(byte[] data, int offset, int count)
 		{
-#if USEBC || WINDOWS_UWP || NETSTANDARD1X
+#if USEBC || WINDOWS_UWP || NETSTANDARD1X || NONATIVEHASH
 			Sha256Digest sha256 = new Sha256Digest();
 			sha256.BlockUpdate(data, offset, count);
 			byte[] rv = new byte[32];
@@ -693,7 +693,7 @@

 		public static byte[] SHA512(byte[] data, int offset, int count)
 		{
-#if USEBC || WINDOWS_UWP || NETSTANDARD1X
+#if USEBC || WINDOWS_UWP || NETSTANDARD1X || NONATIVEHASH
 			Sha512Digest sha512 = new Sha512Digest();
 			sha512.BlockUpdate(data, offset, count);
 			byte[] rv = new byte[32];
@@ -801,17 +801,29 @@
 		{
 			var mac = new NBitcoin.BouncyCastle.Crypto.Macs.HMac(new Sha512Digest());
 			mac.Init(new KeyParameter(key));
-			mac.Update(data);
+			mac.BlockUpdate(data, 0, data.Length);
 			byte[] result = new byte[mac.GetMacSize()];
 			mac.DoFinal(result, 0);
 			return result;
 		}
-
+#if HAS_SPAN
+		public static bool HMACSHA512(byte[] key, ReadOnlySpan<byte> data, Span<byte> output, out int outputLength)
+		{
+			var outputBuffer = HMACSHA512(key, data.ToArray());
+			outputLength = output.Length;
+
+			if (outputLength > output.Length)
+				return false;
+
+			outputBuffer.CopyTo(output);
+			return true;
+		}
+#endif
 		public static byte[] HMACSHA256(byte[] key, byte[] data)
 		{
 			var mac = new NBitcoin.BouncyCastle.Crypto.Macs.HMac(new Sha256Digest());
 			mac.Init(new KeyParameter(key));
-			mac.Update(data);
+			mac.BlockUpdate(data, 0, data.Length);
 			byte[] result = new byte[mac.GetMacSize()];
 			mac.DoFinal(result, 0);
 			return result;


Added tuple deconstructor for ProcessStartInfo

--- src/Common/ProcessUtils.cs
+++ src/Common/ProcessUtils.cs
@@ -267,5 +267,17 @@
             }
             return new(fileName, arguments) {UseShellExecute = false};
         }
+
+#if !NET20 && !NET40
+        /// <summary>
+        /// Deconstructs a <see cref="ProcessStartInfo"/> like a tuple.
+        /// </summary>
+        [Pure]
+        public static void Deconstruct(this ProcessStartInfo startInfo, out string fileName, out string arguments)
+        {
+            fileName = startInfo.FileName;
+            arguments = startInfo.Arguments;
+        }
+#endif
     }
 }


Support setting Error List selection for C# issues (#2133)

--- src/IssueViz/TableControls/VSTableEventProcessorProvider.cs
+++ src/IssueViz/TableControls/VSTableEventProcessorProvider.cs
@@ -37,7 +37,7 @@
     // We can specify multiple data source types and data source i.e. the same provider can be used for
     // multiple table controls/sources
     [DataSourceType(StandardTableDataSources.ErrorTableDataSource)]
-    [DataSource(SonarLintTableControlConstants.ErrorListDataSourceIdentifier)]
+    [DataSource(StandardTableDataSources.AnyDataSource)] // Support any item in the error list, no matter the source (fixes SLVS #2125)
     internal class VSTableEventProcessorProvider : ITableControlEventProcessorProvider
     {
         private readonly IIssueSelectionService selectionService;


简单的调整下代码格式。

简单的调整下代码格式。

--- src/Components/ListView.cs
+++ src/Components/ListView.cs
@@ -37,6 +37,7 @@
 namespace Zongsoft.Web.Controls
 {
 	[ParseChildren(true)]
+	[PersistChildren(false)]
 	public class ListView : CompositeDataBoundControl, INamingContainer
 	{
 		#region 成员字段
@@ -159,6 +160,80 @@
 		#endregion

 		#region 重写方法
+		protected override void RenderBeginTag(HtmlTextWriter writer)
+		{
+			var tagName = string.Empty;
+
+			switch(this.RenderMode)
+			{
+				case ListRenderMode.List:
+					tagName = "dl";
+					break;
+				case ListRenderMode.BulletList:
+					tagName = "ul";
+					break;
+				case ListRenderMode.OrderedList:
+					tagName = "ol";
+					break;
+			}
+
+			if(!string.IsNullOrWhiteSpace(tagName))
+			{
+				if(!string.IsNullOrWhiteSpace(this.ID))
+					writer.AddAttribute(HtmlTextWriterAttribute.Id, this.ID);
+
+				if(!string.IsNullOrWhiteSpace(this.CssClass))
+					writer.AddAttribute(HtmlTextWriterAttribute.Class, this.CssClass);
+
+				writer.RenderBeginTag(tagName);
+			}
+
+			if(_headerTemplate != null)
+				_headerTemplate.InstantiateIn(this);
+		}
+
+		protected override void RenderEndTag(HtmlTextWriter writer)
+		{
+			if(_footerTemplate != null)
+				_footerTemplate.InstantiateIn(this);
+
+			if(this.RenderMode != ListRenderMode.None)
+				writer.RenderEndTag();
+		}
+
+		protected override void RenderContent(HtmlTextWriter writer)
+		{
+			if(this.DataSource == null)
+			{
+				if(_emptyTemplate != null)
+					_emptyTemplate.InstantiateIn(this);
+
+				return;
+			}
+
+			IEnumerable dataItems = this.DataSource as IEnumerable;
+
+			if(dataItems == null || dataItems.GetType() == typeof(string))
+			{
+				var item = new DataItemContainer<ListView>(this, this.DataSource, 0);
+				this.RenderItem(writer, item);
+			}
+			else
+			{
+				int index = 0;
+
+				foreach(var dataItem in dataItems)
+				{
+					FormExtension.PushDataItem(this.Page, dataItem);
+
+					var item = new DataItemContainer<ListView>(this, dataItem, index++);
+					this.RenderItem(writer, item);
+
+					FormExtension.PopDataItem(this.Page);
+				}
+			}
+		}
+
 		protected override void Render(HtmlTextWriter writer)
 		{
 			if(this.DataSource == null && this.EmptyTemplateScope == EmptyTemplateScope.Control)
@@ -172,91 +247,13 @@
 				return;
 			}

-			//生成头部内容
-			var header = this.CreateHeader() ?? this;
-
-			if(this.DataSource == null)
-			{
-				if(_emptyTemplate != null)
-					_emptyTemplate.InstantiateIn(this);
-			}
-			else
-			{
-				IEnumerable dataItems = this.DataSource as IEnumerable;
-
-				if(dataItems == null || dataItems.GetType() == typeof(string))
-				{
-					var item = new DataItemContainer<ListView>(this, this.DataSource, 0);
-					this.CreateItem(item);
-					header.Controls.Add(item);
-				}
-				else
-				{
-					int index = 0;
-
-					foreach(var dataItem in dataItems)
-					{
-						FormExtension.PushDataItem(this.Page, dataItem);
-
-						var item = new DataItemContainer<ListView>(this, dataItem, index++);
-						this.CreateItem(item);
-						header.Controls.Add(item);
-
-						FormExtension.PopDataItem(this.Page);
-					}
-				}
-			}
-
-			//生成脚部内容
-			this.CreateFooter();
-
 			//调用基类同名方法
 			base.Render(writer);
 		}
 		#endregion

 		#region 虚拟方法
-		protected virtual Control CreateHeader()
-		{
-			Control container = null;
-
-			switch(this.RenderMode)
-			{
-				case ListRenderMode.List:
-					container = new Literal("dl", this.CssClass);
-					break;
-				case ListRenderMode.BulletList:
-					container = new Literal("ul", this.CssClass);
-					break;
-				case ListRenderMode.OrderedList:
-					container = new Literal("ol", this.CssClass);
-					break;
-			}
-
-			if(container != null)
-			{
-				container.ID = this.ID;
-				this.Controls.Add(container);
-			}
-
-			if(_headerTemplate != null)
-			{
-				if(container == null)
-					container = this;
-
-				_headerTemplate.InstantiateIn(container);
-			}
-
-			return container;
-		}
-
-		protected virtual void CreateFooter()
-		{
-			if(_footerTemplate != null)
-				_footerTemplate.InstantiateIn(this);
-		}
-
-		protected virtual void CreateItem(DataItemContainer<ListView> item)
+		protected virtual void RenderItem(HtmlTextWriter writer, DataItemContainer<ListView> item)
 		{
 			switch(this.RenderMode)
 			{
@@ -271,6 +268,8 @@

 			if(_itemTemplate != null)
 				_itemTemplate.InstantiateIn(item);
+
+			item.RenderControl(writer);
 		}
 		#endregion
 	}


Update DataTableExtensions.cs

Update DataTableExtensions.cs

--- src/DataTableExtensions.cs
+++ src/DataTableExtensions.cs
@@ -20,7 +20,7 @@
 		/// <param name="path">The path to the CSV file.</param>
 		/// <param name="separator">The field separator used in the CSV file.</param>
 		/// <returns>A <see cref="System.Data.DataTable"/> representing the contents of the CSV file.</returns>
-		public static DataTable CSVToDataTable(string path, string separator)
+		public static DataTable CSVToDataTable(string path, string separator = null)
 		{
 			var csv = OpenCSV(path, separator).ToList();
 			var dt = new DataTable(path);
@@ -81,7 +81,7 @@
 		/// <param name="separator">The field separator to use.</param>
 		/// <returns>An enumerable containing a <see cref="System.String"/> array all the fields in each row.</returns>
 		/// <exception cref="ArgumentNullException"><paramref name="path"/> or <paramref name="separator"/> is null or empty.</exception>
-		public static IEnumerable<string[]> OpenCSV(string path, string separator)
+		public static IEnumerable<string[]> OpenCSV(string path, string separator = null)
 		{ //http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.fileio.textfieldparser.aspx
 			if (separator == null)
 				separator = DetermineCSVSeparator(path);


ExportDialogクラスの出力処理の実装を変更

ExportDialogクラスの出力処理の実装を変更

--- src/Dialog/ExportDialog.cs
+++ src/Dialog/ExportDialog.cs
@@ -106,29 +106,28 @@
                 = false;
             this.button_stop.Enabled = true;

-            int bit = this.radioButton_16bit.Checked ? 2 : 1;
-            int samplingRate = int.Parse(this.comboBox_samplingRate.Text.Substring(0, this.comboBox_samplingRate.Text.IndexOf(' ')));
-            int oversampling = (int)Math.Pow(2, this.trackBar_oversampling.Value);
-
-            long filesize = (this.radioButton_unlimit.Checked) ?
+            ExportData data = new ExportData();
+
+            data.Bit = this.radioButton_16bit.Checked ? 2 : 1;
+            data.SamplingRate = int.Parse(this.comboBox_samplingRate.Text.Substring(0, this.comboBox_samplingRate.Text.IndexOf(' ')));
+            data.Oversampling = (int)Math.Pow(2, this.trackBar_oversampling.Value);
+
+            data.FileSize = (this.radioButton_unlimit.Checked) ?
                 (long)Int32.MaxValue :
                     (this.radioButton_time.Checked) ?
-                    (long)((double)(this.numericUpDown_min.Value * 60m + this.numericUpDown_sec.Value) * samplingRate * 2.0 * bit) :
+                    (long)((double)(this.numericUpDown_min.Value * 60m + this.numericUpDown_sec.Value) * data.SamplingRate * 2.0 * data.Bit) :
                     (long)(this.numericUpDown_filesize.Value * 1024.0m * 1024.0m);
-            long output = 0;
-
-            bool sequenceEnded = false;
-
-            SmfConnector connector = new SmfConnector(samplingRate * oversampling);
+
+            data.Connector = new SmfConnector(data.SamplingRate * data.Oversampling);
             {
                 foreach (var presetFile in this.presetFiles)
-                    connector.AddPreset(presetFile);
-
-                connector.Load(this.inputFile);
-                connector.Sequencer.SequenceEnd += (s2, e2) => { sequenceEnded = true; connector.Master.Release(); };
-
-                this.masterControlDialog.ApplyToMaster(connector.Master);
-                this.masterControlDialog.ApplyToSequencer(connector.Sequencer);
+                    data.Connector.AddPreset(presetFile);
+
+                data.Connector.Load(this.inputFile);
+                data.Connector.Sequencer.SequenceEnd += (s2, e2) => { data.SequenceEnded = true; data.Connector.Master.Release(); };
+
+                this.masterControlDialog.ApplyToMaster(data.Connector.Master);
+                this.masterControlDialog.ApplyToSequencer(data.Connector.Sequencer);
             }

             if (!this.CheckFileCreate(this.textBox_saveto.Text))
@@ -139,93 +138,96 @@

             this.reqEnd = false;

-            Task.Factory.StartNew(() =>
-            {
-                using (FileStream fs = new FileStream(this.textBox_saveto.Text, FileMode.Create))
-                using (WaveFormatWriter wfw = new WaveFormatWriter(fs, samplingRate, bit * 8, 2))
-                {
-                    const int bufferSize = 512;
-                    const int filterSize = 4096;
-
-                    float[] buffer = new float[bufferSize];
-                    double[] buffer_double = new double[filterSize];
-                    double[] bufferOut = new double[filterSize];
-
-                    SoundFilter filter = new SoundFilter(true, filterSize);
-                    var filterGenerator = new LowPassFilter()
+            Task.Factory.StartNew(() => this.ExportLoop(data), TaskCreationOptions.LongRunning);
+            Task.Factory.StartNew(() => this.UpdateLabelText(data), TaskCreationOptions.LongRunning);
+        }
+
+        private void ExportLoop(ExportData data)
+        {
+            using (FileStream fs = new FileStream(this.textBox_saveto.Text, FileMode.Create))
+            using (WaveFormatWriter wfw = new WaveFormatWriter(fs, data.SamplingRate, data.Bit * 8, 2))
+            {
+                const int bufferSize = 512;
+                const int filterSize = 4096;
+
+                float[] buffer = new float[bufferSize];
+                double[] buffer_double = new double[filterSize];
+                double[] bufferOut = new double[filterSize];
+
+                SoundFilter filter = new SoundFilter(true, filterSize);
+                var filterGenerator = new LowPassFilter()
+                {
+                    SamplingRate = data.SamplingRate * data.Oversampling,
+                    CutoffFrequency = data.SamplingRate / 2 - ImpulseResponse.GetDelta(data.SamplingRate * data.Oversampling, filterSize)
+                };
+                double[] impulse = filterGenerator.Generate(filterSize / 2);
+
+                Window.Hanning(impulse);
+                filter.SetFilter(impulse);
+
+                double bufferTime = (buffer.Length / 2.0) / (data.SamplingRate * data.Oversampling);
+
+                var filterBuffer = new FilterBuffer<float>(filterSize, da =>
+                {
+                    if (data.Oversampling > 1)
                     {
-                        SamplingRate = samplingRate * oversampling,
-                        CutoffFrequency = samplingRate / 2 - ImpulseResponse.GetDelta(samplingRate * oversampling, filterSize)
-                    };
-                    double[] impulse = filterGenerator.Generate(filterSize / 2);
-
-                    Window.Hanning(impulse);
-                    filter.SetFilter(impulse);
-
-                    double bufferTime = (buffer.Length / 2.0) / (samplingRate * oversampling);
-
-                    var filterBuffer = new FilterBuffer<float>(filterSize, da =>
-                    {
-                        if (oversampling > 1)
+                        for (int i = 0; i < filterSize; i++)
+                            bufferOut[i] = da[i];
+
+                        filter.Filtering(bufferOut);
+
+                        for (int i = 0, j = 0; i < filterSize; i += data.Oversampling * 2)
                         {
-                            for (int i = 0; i < filterSize; i++)
-                                bufferOut[i] = da[i];
-
-                            filter.Filtering(bufferOut);
-
-                            for (int i = 0, j = 0; i < filterSize; i += oversampling * 2)
-                            {
-                                buffer_double[j++] = bufferOut[i];
-                                buffer_double[j++] = bufferOut[i + 1];
-                            }
-
-                            wfw.Write(buffer_double, 0, (int)Math.Min(filterSize / oversampling, filesize - output));
+                            buffer_double[j++] = bufferOut[i];
+                            buffer_double[j++] = bufferOut[i + 1];
                         }
-                        else
-                            wfw.Write(da, 0, filterSize);
-
-                        output = wfw.WrittenBytes;
-                    });
-
-                    while (!this.reqEnd && filesize > output)
-                    {
-                        connector.Sequencer.Progress(bufferTime);
-                        connector.Master.Read(buffer, 0, bufferSize);
-
-                        filterBuffer.Push(buffer);
-
-                        if (sequenceEnded && connector.Master.ToneCount == 0)
-                            this.reqEnd = true;
+
+                        wfw.Write(buffer_double, 0, (int)Math.Min(filterSize / data.Oversampling, data.FileSize - data.Output));
                     }
-
-                    filterBuffer.Close();
-
-                    this.reqEnd = true;
-                    this.Invoke(new Action(() => button4_Click(null, null)));
+                    else
+                        wfw.Write(da, 0, filterSize);
+
+                    data.Output = wfw.WrittenBytes;
+                });
+
+                while (!this.reqEnd && data.FileSize > data.Output)
+                {
+                    data.Connector.Sequencer.Progress(bufferTime);
+                    data.Connector.Master.Read(buffer, 0, bufferSize);
+
+                    filterBuffer.Push(buffer);
+
+                    if (data.SequenceEnded && data.Connector.Master.ToneCount == 0)
+                        this.reqEnd = true;
                 }
-            }, TaskCreationOptions.LongRunning);
-
-            Task.Factory.StartNew(() =>
-            {
-                TimeSpan ts;
-
-                while (!this.reqEnd)
-                {
-                    ts = TimeSpan.FromSeconds(output / 2.0 / bit / (double)samplingRate);
-
-                    this.Invoke(new Action(() =>
-                    {
-                        long position = connector.Sequencer.Tick;
-                        this.label_progress.Text = String.Format("{0:p0}", (double)output / (double)filesize);
-                        this.progressBar.Value = (int)((double)output / (double)filesize * 100);
-                        this.label_filesize.Text = String.Format("出力: {0:f0} KB", output / 1024.0);
-                        this.label_tick.Text = String.Format("位置: {0}", position < 0 ? 0 : position);
-                        this.label_time.Text = String.Format("時間: {0}:{1:d2}", (int)ts.TotalMinutes, ts.Seconds);
-                    }));
-
-                    Thread.Sleep(30);
-                }
-            }, TaskCreationOptions.LongRunning);
+
+                filterBuffer.Close();
+
+                this.reqEnd = true;
+                this.Invoke(new Action(() => button4_Click(null, null)));
+            }
+        }
+
+        private void UpdateLabelText(ExportData data)
+        {
+            TimeSpan ts;
+
+            while (!this.reqEnd)
+            {
+                ts = TimeSpan.FromSeconds(data.Output / 2.0 / data.Bit / (double)data.SamplingRate);
+
+                this.Invoke(new Action(() =>
+                {
+                    long position = data.Connector.Sequencer.Tick;
+                    this.label_progress.Text = String.Format("{0:p0}", (double)data.Output / (double)data.FileSize);
+                    this.progressBar.Value = (int)((double)data.Output / (double)data.FileSize * 100);
+                    this.label_filesize.Text = String.Format("出力: {0:f0} KB", data.Output / 1024.0);
+                    this.label_tick.Text = String.Format("位置: {0}", position < 0 ? 0 : position);
+                    this.label_time.Text = String.Format("時間: {0}:{1:d2}", (int)ts.TotalMinutes, ts.Seconds);
+                }));
+
+                Thread.Sleep(30);
+            }
         }

         private void button4_Click(object sender, EventArgs e)
@@ -254,5 +256,16 @@
                 return false;
             }
         }
+
+        class ExportData
+        {
+            public SmfConnector Connector { get; set; }
+            public long Output { get; set; }
+            public int SamplingRate { get; set; }
+            public int Bit { get; set; }
+            public long FileSize { get; set; }
+            public int Oversampling { get; set; }
+            public bool SequenceEnded { get; set; }
+        }
     }
 }


Fixed GetColumnName().

Fixed GetColumnName().

--- src/Dommel/DommelMapper.cs
+++ src/Dommel/DommelMapper.cs
@@ -442,7 +442,7 @@

                 if (keyProperty != null)
                 {
-                    string keyColumnName = GetColumnName(keyProperty);
+                    string keyColumnName = GetColumnName(keyProperty.DeclaringType, keyProperty);

                     sql += " RETURNING " + keyColumnName;
                 }


Check for continuous job cancellation before each job run

--- src/Foundatio/Jobs/IJob.cs
+++ src/Foundatio/Jobs/IJob.cs
@@ -33,7 +33,7 @@
                     logger.LogInformation("Starting continuous job type {JobName} on machine {MachineName}...", jobName, Environment.MachineName);

                 var sw = Stopwatch.StartNew();
-                while (true) {
+                while (!cancellationToken.IsCancellationRequested) {
                     var result = await job.TryRunAsync(cancellationToken).AnyContext();
                     LogResult(result, logger, jobName);
                     iterations++;


refactor Insert

refactor Insert

--- src/MicroOrm.Dapper.Repositories/DapperRepository.Insert.cs
+++ src/MicroOrm.Dapper.Repositories/DapperRepository.Insert.cs
@@ -22,27 +22,14 @@
         /// <inheritdoc />
         public virtual bool Insert(TEntity instance, IDbTransaction transaction)
         {
-            bool added;
-
             var queryResult = SqlGenerator.GetInsert(instance);

             if (SqlGenerator.IsIdentity)
             {
                 var newId = Connection.Query<long>(queryResult.GetSql(), queryResult.Param, transaction).FirstOrDefault();
-                added = newId > 0;
-
-                if (added)
-                {
-                    var newParsedId = Convert.ChangeType(newId, SqlGenerator.IdentitySqlProperty.PropertyInfo.PropertyType);
-                    SqlGenerator.IdentitySqlProperty.PropertyInfo.SetValue(instance, newParsedId);
-                }
+                return SetValue(newId, instance);
             }
-            else
-            {
-                added = Connection.Execute(queryResult.GetSql(), instance, transaction) > 0;
-            }
-
-            return added;
+            return Connection.Execute(queryResult.GetSql(), instance, transaction) > 0;
         }

         /// <inheritdoc />
@@ -54,26 +41,26 @@
         /// <inheritdoc />
         public virtual async Task<bool> InsertAsync(TEntity instance, IDbTransaction transaction)
         {
-            bool added;
-
             var queryResult = SqlGenerator.GetInsert(instance);

             if (SqlGenerator.IsIdentity)
             {
                 var newId = (await Connection.QueryAsync<long>(queryResult.GetSql(), queryResult.Param, transaction)).FirstOrDefault();
-                added = newId > 0;
-
-                if (added)
-                {
-                    var newParsedId = Convert.ChangeType(newId, SqlGenerator.IdentitySqlProperty.PropertyInfo.PropertyType);
-                    SqlGenerator.IdentitySqlProperty.PropertyInfo.SetValue(instance, newParsedId);
-                }
-            }
-            else
-            {
-                added = await Connection.ExecuteAsync(queryResult.GetSql(), instance, transaction) > 0;
+                return SetValue(newId, instance);
             }

+            return await Connection.ExecuteAsync(queryResult.GetSql(), instance, transaction) > 0;
+        }
+
+        private bool SetValue(long newId, TEntity instance)
+        {
+            var added = newId > 0;
+
+            if (added)
+            {
+                var newParsedId = Convert.ChangeType(newId, SqlGenerator.IdentitySqlProperty.PropertyInfo.PropertyType);
+                SqlGenerator.IdentitySqlProperty.PropertyInfo.SetValue(instance, newParsedId);
+            }
             return added;
         }
     }


Change namespace to avoid conflict

Change namespace to avoid conflict

--- src/Microsoft.AspNetCore.Sockets.Abstractions/DuplexPipe.cs
+++ src/Microsoft.AspNetCore.Sockets.Abstractions/DuplexPipe.cs
@@ -1,7 +1,9 @@
 // Copyright (c) .NET Foundation. All rights reserved.
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

-namespace System.IO.Pipelines
+using System.IO.Pipelines;
+
+namespace Microsoft.AspNetCore.Sockets
 {
     public class DuplexPipe : IDuplexPipe
     {


Added safe area insets to iOS on all pages

--- src/MobileKidsIdApp/MobileKidsIdApp/Mvvm/ContentPageBase.cs
+++ src/MobileKidsIdApp/MobileKidsIdApp/Mvvm/ContentPageBase.cs
@@ -1,10 +1,16 @@
 using Xamarin.Forms;
+using Xamarin.Forms.PlatformConfiguration;
+using Xamarin.Forms.PlatformConfiguration.iOSSpecific;

 namespace MobileKidsIdApp
 {
     public abstract class ContentPageBase : ContentPage
     {
-        public ContentPageBase() => Visual = VisualMarker.Material;
+        public ContentPageBase()
+        {
+            Visual = VisualMarker.Material;
+            On<iOS>().SetUseSafeArea(true);
+        }

         protected ViewModelBase ViewModel => BindingContext as ViewModelBase;


[Modify] Add a pre-check for url decode

[Modify] Add a pre-check for url decode

--- websocket-sharp/Server/HttpServer.cs
+++ websocket-sharp/Server/HttpServer.cs
@@ -920,6 +920,8 @@
       }

       var path = uri.AbsolutePath;
+      if (path.IndexOfAny (new[] { '%', '+' }) > -1)
+        path = HttpUtility.UrlDecode (path, Encoding.UTF8);

       WebSocketServiceHost host;
       if (!_services.InternalTryGetServiceHost (path, out host)) {


Improve error message on EmptyConstraint

--- src/NUnitFramework/framework/Constraints/EmptyConstraint.cs
+++ src/NUnitFramework/framework/Constraints/EmptyConstraint.cs
@@ -20,7 +20,6 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 // ***********************************************************************
-

 using System;


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Server/HttpServer.cs
+++ websocket-sharp/Server/HttpServer.cs
@@ -215,27 +215,29 @@
     /// </summary>
     /// <remarks>
     ///   <para>
-    ///   An instance initialized by this constructor listens for the incoming requests on
+    ///   The new instance listens for incoming requests on
     ///   <paramref name="address"/> and <paramref name="port"/>.
     ///   </para>
     ///   <para>
-    ///   If <paramref name="port"/> is 443, that instance provides a secure connection.
+    ///   It provides secure connections if <paramref name="port"/> is 443.
     ///   </para>
     /// </remarks>
     /// <param name="address">
-    /// A <see cref="System.Net.IPAddress"/> that represents the local IP address of the server.
+    /// A <see cref="System.Net.IPAddress"/> that represents
+    /// the local IP address on which to listen.
     /// </param>
     /// <param name="port">
-    /// An <see cref="int"/> that represents the port number on which to listen.
+    /// An <see cref="int"/> that represents the number of the port
+    /// on which to listen.
     /// </param>
     /// <exception cref="ArgumentNullException">
     /// <paramref name="address"/> is <see langword="null"/>.
     /// </exception>
     /// <exception cref="ArgumentException">
-    /// <paramref name="address"/> isn't a local IP address.
+    /// <paramref name="address"/> is not a local IP address.
     /// </exception>
     /// <exception cref="ArgumentOutOfRangeException">
-    /// <paramref name="port"/> isn't between 1 and 65535 inclusive.
+    /// <paramref name="port"/> is less than 1 or greater than 65535.
     /// </exception>
     public HttpServer (System.Net.IPAddress address, int port)
       : this (address, port, port == 443)


Added checksum check for indexes

Added checksum check for indexes

--- DBMigrator/Database.cs
+++ DBMigrator/Database.cs
@@ -266,6 +266,24 @@
             return CheckSumHelper(query);
         }

+        public int GetIndexesChecksum()
+        {
+            var query = @"SELECT
+                        CHECKSUM_AGG(CHECKSUM
+                        ([CONSTRAINT_CATALOG]
+                          ,[CONSTRAINT_SCHEMA]
+                          ,[CONSTRAINT_NAME]
+                          ,[TABLE_CATALOG]
+                          ,[TABLE_SCHEMA]
+                          ,[TABLE_NAME]
+                          ,[CONSTRAINT_TYPE]
+                          ,[IS_DEFERRABLE]
+                          ,[INITIALLY_DEFERRED])) as IndexesChecksum
+                        FROM [INFORMATION_SCHEMA].[TABLE_CONSTRAINTS]";
+
+            return CheckSumHelper(query);
+        }
+
         private int CheckSumHelper(string query)
         {
             var result = 0;


Fix typo in ZonedClock comment

Fix typo in ZonedClock comment

--- src/NodaTime/ZonedClock.cs
+++ src/NodaTime/ZonedClock.cs
@@ -16,7 +16,7 @@
     public sealed class ZonedClock : IClock
     {
         /// Gets the clock used to provide the current instant.
-        /// <value>The time zone associated with this zoned clock.</value>
+        /// <value>The clock associated with this zoned clock.</value>
         public IClock Clock { get; }

         /// Gets the time zone used when converting the current instant into a zone-sensitive value.


[CGS] VmWare Support: Hidding VideoDriver Enum from User

--- source/Cosmos.System2/Graphics/FullScreenCanvas.cs
+++ source/Cosmos.System2/Graphics/FullScreenCanvas.cs
@@ -6,22 +6,32 @@
 {
     public static class FullScreenCanvas
     {
-        public enum VideoDriver
+        private enum VideoDriver
         {
             VMWareSVGAIIDriver,
             //VGADriver,
             VBEDriver
         }
+
+        private static PCIDevice SVGAIIDevice = PCI.GetDevice(0x15AD, 0x0405);
+
+        private static bool SVGAIIExists = SVGAIIDevice.DeviceExists;
+
+        private static VideoDriver videoDevice;

         private static Canvas MyVideoDriver;

-        public static Canvas GetFullScreenCanvas(Mode mode, VideoDriver videoDriver)
+        public static Canvas GetFullScreenCanvas(Mode mode)
         {
             Global.mDebugger.SendInternal("GetFullScreenCanvas() with mode " + mode);

-            if (videoDriver == VideoDriver.VMWareSVGAIIDriver)
+            /* Use SVGAII When Exists in PCI */
+            if(xSVGAIIExists)
+                xVideoDevice = VideoDriver.VMWareSVGAIIDriver;
+
+            if (xVideoDevice == VideoDriver.VMWareSVGAIIDriver)
                 return MyVideoDriver = new SVGAIIScreen(mode);
-            else if (videoDriver == VideoDriver.VBEDriver)
+            else if (xVideoDevice == VideoDriver.VBEDriver)
                 return MyVideoDriver = new VBEScreen(mode);

             /* We have already got a VideoDriver istance simple change its mode */
@@ -29,13 +39,17 @@
             return MyVideoDriver;
         }

-        public static Canvas GetFullScreenCanvas(VideoDriver videoDriver)
+        public static Canvas GetFullScreenCanvas()
         {
             Global.mDebugger.SendInternal($"GetFullScreenCanvas() with default mode");
-
-            if (videoDriver == VideoDriver.VMWareSVGAIIDriver)
+
+            /* Use SVGAII When Exists in PCI */
+            if(xSVGAIIExists)
+                xVideoDevice = VideoDriver.VMWareSVGAIIDriver;
+
+            if (xVideoDevice == VideoDriver.VMWareSVGAIIDriver)
                 return MyVideoDriver = new SVGAIIScreen();
-            else if (videoDriver == VideoDriver.VBEDriver)
+            else if (xVideoDevice == VideoDriver.VBEDriver)
                 return MyVideoDriver = new VBEScreen();

             /* We have already got a VideoDriver istance simple reset its mode to DefaultGraphicMode */


WorkScheduler refactorings

WorkScheduler refactorings

--- source/FFImageLoading.Common/Work/WorkScheduler.cs
+++ source/FFImageLoading.Common/Work/WorkScheduler.cs
@@ -11,10 +11,6 @@
 {
     public interface IWorkScheduler
     {
-        /// <summary>
-        /// Cancels any pending work for the task.
-        /// </summary>
-        /// <param name="task">Image loading task to cancel</param>
         void Cancel(IImageLoaderTask task);

         bool ExitTasksEarly { get; }
@@ -25,11 +21,6 @@

         void RemovePendingTask(IImageLoaderTask task);

-        /// <summary>
-        /// Schedules the image loading. If image is found in cache then it returns it, otherwise it loads it.
-        /// </summary>
-        /// <param name="key">Key for cache lookup.</param>
-        /// <param name="task">Image loading task.</param>
         void LoadImage(IImageLoaderTask task);
     }

@@ -44,48 +35,28 @@
             public Task FrameworkWrappingTask { get; set; }
         }

-        private readonly IMiniLogger _logger;
-        private readonly int _defaultParallelTasks;
-        private readonly object _pendingTasksLock;
-        private readonly List<PendingTask> _pendingTasks;
-
-        private readonly ConcurrentDictionary<string, PendingTask> _currentlyRunning; // Here we use the dictionary as a concurrent set
-        private Task _dispatch;
-
-        private bool _exitTasksEarly; // volatile?
-        private bool _pauseWork; // volatile?
-        private int _currentPosition; // useful?
+        readonly IMiniLogger _logger;
+        readonly int _maxParallelTasks;
+        readonly object _pendingTasksLock = new object();
+        readonly List<PendingTask> _pendingTasks = new List<PendingTask>();
+        readonly Dictionary<string, PendingTask> _currentlyRunning = new Dictionary<string, PendingTask>();
+        Task _dispatch = Task.FromResult<byte>(1);
+
+        bool _pauseWork; // volatile?
+        int _currentPosition; // useful?

         public WorkScheduler(IMiniLogger logger)
         {
             _logger = logger;
-
-            _pendingTasksLock = new object();
-            _pendingTasks = new List<PendingTask>();
-
-            _currentlyRunning = new ConcurrentDictionary<string, PendingTask>();
-            _dispatch = Task.FromResult<byte>(1);

             int _processorCount = Environment.ProcessorCount;
             if (_processorCount <= 2)
-                _defaultParallelTasks = 1;
+                _maxParallelTasks = 1;
             else
-                _defaultParallelTasks = (int)Math.Truncate((double)_processorCount / 2d) + 1;
-        }
-
-        public virtual int MaxParallelTasks
-        {
-            get
-            {
-                return _defaultParallelTasks;
-            }
-        }
-
-        /// <summary>
-        /// Cancels any pending work for the task.
-        /// </summary>
-        /// <param name="task">Image loading task to cancel</param>
-        /// <returns><c>true</c> if this instance cancel task; otherwise, <c>false</c>.</returns>
+                _maxParallelTasks = (int)Math.Truncate((double)_processorCount / 2d) + 1;
+        }
+
+
         public void Cancel(IImageLoaderTask task)
         {
             try
@@ -106,17 +77,11 @@
             }
         }

-        public bool ExitTasksEarly
-        {
-            get
-            {
-                return _exitTasksEarly;
-            }
-        }
+        public bool ExitTasksEarly { get; private set; }

         public void SetExitTasksEarly(bool exitTasksEarly)
         {
-            _exitTasksEarly = exitTasksEarly;
+            ExitTasksEarly = exitTasksEarly;
             SetPauseWork(false);
         }

@@ -163,15 +128,15 @@
             if (task == null)
                 return;

+            if (task.IsCancelled)
+            {
+                task.Parameters?.Dispose(); // this will ensure we don't keep a reference due to callbacks
+                return;
+            }
+
             if (task.Parameters.DelayInMs != null && task.Parameters.DelayInMs > 0)
             {
                 await Task.Delay(task.Parameters.DelayInMs.Value).ConfigureAwait(false);
-            }
-
-            if (task.IsCancelled)
-            {
-                task.Parameters.Dispose(); // this will ensure we don't keep a reference due to callbacks
-                return;
             }

             // If we have the image in memory then it's pointless to schedule the job: just display it straight away
@@ -199,7 +164,7 @@
         {
             if (task.IsCancelled)
             {
-                task.Parameters.Dispose(); // this will ensure we don't keep a reference due to callbacks
+                task.Parameters?.Dispose(); // this will ensure we don't keep a reference due to callbacks
                 return;
             }

@@ -227,35 +192,31 @@

             if (task.IsCancelled || _pauseWork)
             {
-                task.Parameters.Dispose(); // this will ensure we don't keep a reference due to callbacks
+                task.Parameters?.Dispose(); // this will ensure we don't keep a reference due to callbacks
                 return;
             }

             QueueAndGenerateImage(task);
-            return;
-        }
-
-        private PendingTask GetPendingTaskIfValid(IImageLoaderTask task, bool rawKey)
-        {
-            string key = task.GetKey(raw: rawKey);
-            lock (_pendingTasksLock)
-            {
-                return _pendingTasks.FirstOrDefault(t => t.ImageLoadingTask.GetKey(raw: rawKey) == key);
-            }
-        }
-
-        private PendingTask FindSimilarPendingTask(IImageLoaderTask task)
-        {
-            // At first check if the exact same items exists in pending tasks (exact same means same transformations, same downsample, ...)
-            // Since it will be exactly the same it can be retrieved from memory cache
-            var alreadyRunningTaskForSameKey = GetPendingTaskIfValid(task, false);
-            if (alreadyRunningTaskForSameKey == null)
-            {
-                // No exact same task found, check if a similar task exists (not necessarily the same transformations, downsample, ...)
-                alreadyRunningTaskForSameKey = GetPendingTaskIfValid(task, true);
-            }
-
-            return alreadyRunningTaskForSameKey;
+        }
+
+        private PendingTask FindSimilarPendingTask(IImageLoaderTask task)
+        {
+            // At first check if the exact same items exists in pending tasks (exact same means same transformations, same downsample, ...)
+            // Since it will be exactly the same it can be retrieved from memory cache
+            string key = task.GetKey(raw: false);
+
+            var alreadyRunningTaskForSameKey = _pendingTasks.FirstOrDefault(t => t.ImageLoadingTask.GetKey(raw: false) == key);
+
+            //TODO BUG / DISABLED as it always resultt with "Similar request finished but the image is not in the cache"
+            //if (alreadyRunningTaskForSameKey == null)
+            //{
+            //    // No exact same task found, check if a similar task exists (not necessarily the same transformations, downsample, ...)
+            //    var rawKey = task.GetKey(raw: true);
+
+            //    alreadyRunningTaskForSameKey = _pendingTasks.FirstOrDefault(t => t.ImageLoadingTask.GetKey(raw: true) == rawKey);
+            //}
+
+            return alreadyRunningTaskForSameKey;
         }

         private void QueueAndGenerateImage(IImageLoaderTask task)
@@ -315,10 +276,11 @@

             // Now our image should be in the cache
             var cacheResult = await currentPendingTask.ImageLoadingTask.TryLoadingFromCacheAsync().ConfigureAwait(false);
-            if (cacheResult != FFImageLoading.Cache.CacheResult.Found)
+            if (cacheResult != CacheResult.Found)
             {
                 _logger.Debug(string.Format("Similar request finished but the image is not in the cache: {0}", queuedKey));
                 forceQueue();
+                return;
             }
             else
             {
@@ -332,7 +294,7 @@

         private async void Run(PendingTask pendingTask)
         {
-            if (MaxParallelTasks <= 0)
+            if (_maxParallelTasks <= 0)
             {
                 pendingTask.FrameworkWrappingTask = pendingTask.ImageLoadingTask.RunAsync(); // FMT: threadpool will limit concurrent work
                 await pendingTask.FrameworkWrappingTask.ConfigureAwait(false);
@@ -365,22 +327,20 @@

         private async Task RunAsync()
         {
-            if (_currentlyRunning.Count >= MaxParallelTasks)
-            {
-                return;
-            }
-
             Dictionary<string, PendingTask> currentLotOfPendingTasks = null;

-            int numberOfTasks = MaxParallelTasks - _currentlyRunning.Count;
-            if (numberOfTasks > 0)
-            {
-                currentLotOfPendingTasks = new Dictionary<string, PendingTask>();
-
-                lock (_pendingTasksLock)
-                {
-                    foreach (var task in
-                             _pendingTasks
+            lock (_pendingTasksLock)
+            {
+                if (_currentlyRunning.Count >= _maxParallelTasks)
+                    return;
+
+                int numberOfTasks = _maxParallelTasks - _currentlyRunning.Count;
+                if (numberOfTasks > 0)
+                {
+                    currentLotOfPendingTasks = new Dictionary<string, PendingTask>();
+
+
+                    foreach (var task in _pendingTasks
                                 .Where(t => !t.ImageLoadingTask.IsCancelled && !t.ImageLoadingTask.Completed)
                                 .OrderByDescending(t => t.ImageLoadingTask.Parameters.Priority)
                                 .ThenBy(t => t.Position))
@@ -403,7 +363,6 @@
                 }
             }

-
             if (currentLotOfPendingTasks == null || currentLotOfPendingTasks.Count == 0)
             {
                 return; // FMT: no need to do anything else
@@ -422,15 +381,21 @@

         private async Task QueueTaskAsync(PendingTask pendingTask, bool scheduleOnThreadPool)
         {
-            if (_currentlyRunning.Count >= MaxParallelTasks)
-                return;
+            lock (_pendingTasks)
+            {
+                if (_currentlyRunning.Count >= _maxParallelTasks)
+                    return;
+            }

             string key = pendingTask.ImageLoadingTask.GetKey();
-            if (!_currentlyRunning.TryAdd(key, pendingTask))
-                return; // If we can't add it it most likely means that it's already in

             try
             {
+                lock (_pendingTasks)
+                {
+                    _currentlyRunning.Add(key, pendingTask);
+                }
+
                 if (scheduleOnThreadPool)
                 {
                     await Task.Run(pendingTask.ImageLoadingTask.RunAsync).ConfigureAwait(false);
@@ -442,14 +407,14 @@
             }
             finally
             {
-                PendingTask doneTask;
-                if (!_currentlyRunning.TryRemove(key, out doneTask))
-                {
-                    _logger.Error("WorkScheduler: Could not remove task from running tasks.");
-                }
-            }
-
-            await RunAsync().ConfigureAwait(false);
+                lock (_pendingTasksLock)
+                {
+                    _currentlyRunning.Remove(key);
+                    _pendingTasks.Remove(pendingTask);
+                }
+
+                await RunAsync().ConfigureAwait(false);
+            }
         }
     }
 }


Travis test

Travis test

--- UnitTest/SDK.cs
+++ UnitTest/SDK.cs
@@ -396,7 +396,7 @@
                 checkValueB = LoadFil("xml.txt");
                 MainElement main = core.TemplateFromXml(checkValueB);
                 checkValueB = main.ClassToXml();
-                checkValueB = t.LocateReplace(checkValueB, "<Main xmlns:xsi=", ">", "");
+          //      checkValueB = t.LocateReplace(checkValueB, "<Main xmlns:xsi=", ">", "");
                 checkValueB = checkValueB.Replace("\n", String.Empty).Replace("\r", String.Empty).Replace("\t", String.Empty);

                 //Assert


docs: Deprecate non-async deserializeResponse

Can cause subtle issues.

--- src/Restivus/RestClient.cs
+++ src/Restivus/RestClient.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Linq;
 using System.Net.Http;
 using System.Text;
@@ -82,6 +83,40 @@
             HttpMethod method,
             string path) => client.CreateRequestMessageForRelativePath(method, path);

+        /// <summary>
+        /// This overload's use is discouraged, as it can cause subtle misbehavior when
+        /// attempting to await a Task and only catch an Exception it may throw.
+        /// </summary>
+        /// <example>
+        /// try
+        /// {
+        ///     await restClient
+        ///         .SendAsync(
+        ///             HttpMethod.Get,
+        ///             "/health_check",
+        ///             request => { },
+        ///             async response =>
+        ///             {
+        ///                 if (_DetectFailureState(response))
+        ///                 {
+        ///                     var ex = await _ConvertFailedResponseToRelevantException(response);
+        ///                     throw ex;
+        ///                 }
+        ///
+        ///                 // The correctly intended overload will be chosen if you uncomment the
+        ///                 // following line, but callsites are bound to be missing this detail
+        ///                 //
+        ///                 // return Task.CompletedTask;
+        ///             });
+        /// }
+        /// catch (Exception ex)
+        /// {
+        ///     // Execution will not reach this spot.
+        /// }
+        ///
+        /// </example>
+        [Obsolete("Prefer deserializeResponseAsync overload")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public static Task<TResponse> SendAsync<TResponse>(
             this IRestClient client,
             HttpMethod method,
@@ -98,6 +133,41 @@
             );
         }

+        /// <summary>
+        /// This overload's use is discouraged, as it can cause subtle misbehavior when
+        /// attempting to await a Task and only catch an Exception it may throw.
+        /// </summary>
+        /// <example>
+        /// try
+        /// {
+        ///     await restClient
+        ///         .SendAsync(
+        ///             HttpMethod.Get,
+        ///             "/health_check",
+        ///             request => { },
+        ///             async response =>
+        ///             {
+        ///                 if (_DetectFailureState(response))
+        ///                 {
+        ///                     var ex = await _ConvertFailedResponseToRelevantException(response);
+        ///                     throw ex;
+        ///                 }
+        ///
+        ///                 // The correctly intended overload will be chosen if you uncomment the
+        ///                 // following line, but callsites are bound to be missing this detail
+        ///                 //
+        ///                 // return Task.CompletedTask;
+        ///             },
+        ///             someCancellationToken);
+        /// }
+        /// catch (Exception ex)
+        /// {
+        ///     // Execution will not reach this spot.
+        /// }
+        ///
+        /// </example>
+        [Obsolete("Prefer deserializeResponseAsync overload")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public static Task<TResponse> SendAsync<TResponse>(
             this IRestClient client,
             HttpMethod method,


Fix StartRecording logic

Fix StartRecording logic

--- src/Txt.Core/TextSource.cs
+++ src/Txt.Core/TextSource.cs
@@ -463,10 +463,10 @@
             }
             if (watchers == 0)
             {
-                watchers++;
                 ResetBuffer();
             }
-            return dataOffset;
+            watchers++;
+            return currentOffset;
         }

         /// <summary>


Add writer method

Add writer method

--- src/Yarhl/IO/DataWriter.cs
+++ src/Yarhl/IO/DataWriter.cs
@@ -22,7 +22,9 @@
     using System;
     using System.Globalization;
     using System.Linq;
+    using System.Reflection;
     using System.Text;
+    using Yarhl.IO.Serialization;

     /// <summary>
     /// Binary writer for DataStreams.
@@ -472,7 +474,8 @@
                     break;

                 default:
-                    throw new FormatException("Unsupported type");
+                    WriteUsingReflection(type, val);
+                    break;
             }
         }

@@ -572,5 +575,22 @@
                 Stream.WriteByte(val);
             }
         }
+
+        void WriteUsingReflection(Type type, dynamic obj)
+        {
+            PropertyInfo[] properties = type.GetProperties(BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Instance);
+
+            foreach (PropertyInfo property in properties)
+            {
+                bool ignore = Attribute.IsDefined(property, typeof(YarhlIgnoreAttribute));
+                if (ignore)
+                {
+                    continue;
+                }
+
+                dynamic value = property.GetValue(obj);
+                WriteOfType(property.PropertyType, value);
+            }
+        }
     }
 }


Moved OnServerSpawn lifecycle hook for mapped items to RoundStart event

--- UnityProject/Assets/Scripts/Managers/GameManager.cs
+++ UnityProject/Assets/Scripts/Managers/GameManager.cs
@@ -93,11 +93,13 @@
 	private void OnEnable()
 	{
 		SceneManager.activeSceneChanged += OnSceneChange;
+		EventManager.AddHandler(EVENT.RoundStarted, OnRoundStart);
 	}

 	private void OnDisable()
 	{
 		SceneManager.activeSceneChanged -= OnSceneChange;
+		EventManager.RemoveHandler(EVENT.RoundStarted, OnRoundStart);
 	}

 	///<summary>
@@ -241,7 +243,6 @@
 		}
 	}

-
 	/// <summary>
 	/// Calls the start of the preround
 	/// </summary>
@@ -260,35 +261,30 @@
 			// Wait for the PlayerList instance to init before checking player count
 			StartCoroutine(WaitToCheckPlayers());
 		}
-
-		//wait for scene to be ready and fire mapped spawn hooks
-		StartCoroutine(WaitToFireHooks());
-	}
-
-	private IEnumerator WaitToFireHooks()
-	{
-		//we have to wait to fire hooks until the root objects in the scene are active,
-		//otherwise our attempt to find the hooks to call will always return 0.
-		//TODO: Find a better way to do this, maybe there is a hook for this
-		while (FindUtils.FindInterfaceImplementersInScene<IServerSpawn>().Count == 0)
-		{
-			yield return WaitFor.Seconds(1);
-		}
+		else
+		{
+			StartCoroutine(WaitToFireClientHooks());
+		}
+	}
+
+	void OnRoundStart()
+	{
 		if (CustomNetworkManager.Instance._isServer)
 		{
-			//invoke all server + client side hooks on all objects that have them
-			foreach (var serverSpawn in FindUtils.FindInterfaceImplementersInScene<IServerSpawn>())
-			{
-				serverSpawn.OnSpawnServer(SpawnInfo.Mapped(((Component)serverSpawn).gameObject));
+			var iServerSpawns = FindObjectsOfType<MonoBehaviour>().OfType<IServerSpawn>();
+			foreach (var s in iServerSpawns)
+			{
+				s.OnSpawnServer(SpawnInfo.Mapped(((Component)s).gameObject));
 			}
 			Spawn._CallAllClientSpawnHooksInScene();
 		}
-		else
-		{
-			Spawn._CallAllClientSpawnHooksInScene();
-		}
-	}
-
+	}
+
+	private IEnumerator WaitToFireClientHooks()
+	{
+		yield return WaitFor.Seconds(3f);
+		Spawn._CallAllClientSpawnHooksInScene();
+	}

 	/// <summary>
 	/// Setup the station and then begin the round for the selected game mode


Fixes #1020

Fixes #1020

--- VisualStudio/CodeDomProvider/XSharpCodeGenerator.cs
+++ VisualStudio/CodeDomProvider/XSharpCodeGenerator.cs
@@ -1105,7 +1105,8 @@
                 var l2 = new List<string>();
                 foreach (var l in l1)
                 {
-                    if (!l.Trim().StartsWith("//"))
+                    var lTemp = l.Trim();
+                    if (! lTemp.StartsWith("//") && ! lTemp.StartsWith("#"))
                         l2.Add(l);
                 }
                 lastTrivia = String.Join("\r\n", l2);


Simplify MakeSealedRewriter

Simplify MakeSealedRewriter

--- WpfAnalyzers/CodeFixes/Helpers/DocumentEditorExt.cs
+++ WpfAnalyzers/CodeFixes/Helpers/DocumentEditorExt.cs
@@ -40,30 +40,19 @@

             public override SyntaxNode VisitFieldDeclaration(FieldDeclarationSyntax node)
             {
-                if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.VirtualKeyword), out SyntaxToken modifier))
+                if (TryUpdate(node.Modifiers, out var modifiers))
                 {
-                    node = node.WithModifiers(node.Modifiers.Remove(modifier));
+                    return node.WithModifiers(modifiers);
                 }

-                if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.ProtectedKeyword), out modifier))
-                {
-                    node = node.WithModifiers(node.Modifiers.Replace(modifier, SyntaxFactory.Token(SyntaxKind.PrivateKeyword)));
-                }
-
-                return base.VisitFieldDeclaration(node);
+                return node;
             }

             public override SyntaxNode VisitEventDeclaration(EventDeclarationSyntax node)
             {
-                if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.VirtualKeyword), out SyntaxToken modifier))
+                if (TryUpdate(node.Modifiers, out var modifiers))
                 {
-                    node = node.WithModifiers(node.Modifiers.Remove(modifier));
-                }
-
-                if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.ProtectedKeyword), out modifier) &&
-                    !node.Modifiers.Any(SyntaxKind.OverrideKeyword))
-                {
-                    node = node.WithModifiers(node.Modifiers.Replace(modifier, SyntaxFactory.Token(SyntaxKind.PrivateKeyword)));
+                    node = node.WithModifiers(modifiers);
                 }

                 return base.VisitEventDeclaration(node);
@@ -71,15 +60,9 @@

             public override SyntaxNode VisitPropertyDeclaration(PropertyDeclarationSyntax node)
             {
-                if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.VirtualKeyword), out SyntaxToken modifier))
+                if (TryUpdate(node.Modifiers, out var modifiers))
                 {
-                    node = node.WithModifiers(node.Modifiers.Remove(modifier));
-                }
-
-                if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.ProtectedKeyword), out modifier) &&
-                    !node.Modifiers.Any(SyntaxKind.OverrideKeyword))
-                {
-                    node = node.WithModifiers(node.Modifiers.Replace(modifier, SyntaxFactory.Token(SyntaxKind.PrivateKeyword)));
+                    node = node.WithModifiers(modifiers);
                 }

                 return base.VisitPropertyDeclaration(node);
@@ -87,43 +70,24 @@

             public override SyntaxNode VisitAccessorDeclaration(AccessorDeclarationSyntax node)
             {
-                if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.VirtualKeyword), out SyntaxToken modifier))
+                if (node.TryFirstAncestor(out BasePropertyDeclarationSyntax parent) &&
+                    parent.Modifiers.Any(SyntaxKind.ProtectedKeyword) &&
+                    node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.PrivateKeyword), out var modifier))
                 {
-                    node = node.WithModifiers(node.Modifiers.Remove(modifier));
+                    return node.WithModifiers(node.Modifiers.Remove(modifier));
                 }

-                var parentModifiers = node.FirstAncestor<BasePropertyDeclarationSyntax>()?.Modifiers;
-                if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.ProtectedKeyword), out modifier) &&
-                    parentModifiers?.Any(SyntaxKind.OverrideKeyword) == false)
-                {
-                    node = node.WithModifiers(node.Modifiers.Replace(modifier, SyntaxFactory.Token(SyntaxKind.PrivateKeyword)));
-                }
-
-                if (parentModifiers?.TrySingle(x => x.IsKind(SyntaxKind.PrivateKeyword), out modifier) == true)
-                {
-                    if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.PrivateKeyword), out modifier))
-                    {
-                        node = node.WithModifiers(node.Modifiers.Remove(modifier));
-                    }
-                }
-
-                return base.VisitAccessorDeclaration(node);
+                return node;
             }

             public override SyntaxNode VisitMethodDeclaration(MethodDeclarationSyntax node)
             {
-                if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.VirtualKeyword), out SyntaxToken modifier))
+                if (TryUpdate(node.Modifiers, out var modifiers))
                 {
-                    node = node.WithModifiers(node.Modifiers.Remove(modifier));
+                    return node.WithModifiers(modifiers);
                 }

-                if (node.Modifiers.TrySingle(x => x.IsKind(SyntaxKind.ProtectedKeyword), out modifier) &&
-                    !node.Modifiers.Any(SyntaxKind.OverrideKeyword))
-                {
-                    node = node.WithModifiers(node.Modifiers.Replace(modifier, SyntaxFactory.Token(SyntaxKind.PrivateKeyword)));
-                }
-
-                return base.VisitMethodDeclaration(node);
+                return node;
             }

             internal SyntaxNode Visit(SyntaxNode node, ClassDeclarationSyntax classDeclaration)
@@ -133,6 +97,22 @@
                 CurrentClass.Value = null;
                 return updated;
             }
+
+            private static bool TryUpdate(SyntaxTokenList modifiers, out SyntaxTokenList result)
+            {
+                result = modifiers;
+                if (modifiers.TrySingle(x => x.IsKind(SyntaxKind.VirtualKeyword), out var modifier))
+                {
+                    result = modifiers.Remove(modifier);
+                }
+
+                if (result.TrySingle(x => x.IsKind(SyntaxKind.ProtectedKeyword), out modifier))
+                {
+                    result = result.Replace(modifier, SyntaxFactory.Token(SyntaxKind.PrivateKeyword));
+                }
+
+                return result != modifiers;
+            }
         }
     }
 }


Increment version.

Increment version.

Point release for changes. 1.7.3.1

--- source/ElasticsearchInside/Properties/AssemblyInfo.cs
+++ source/ElasticsearchInside/Properties/AssemblyInfo.cs
@@ -12,5 +12,5 @@
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
 [assembly: Guid("5f88eacd-89aa-434d-a369-c20564f9b06b")]
-[assembly: AssemblyInformationalVersion("1.7.3")]
+[assembly: AssemblyInformationalVersion("1.7.3.1")]
 [assembly: InternalsVisibleTo("ElasticsearchInside.Tests")]


throw error on unsuccessfull connection

throw error on unsuccessfull connection

--- IrcClient4Net/Clients/IrcClient.cs
+++ IrcClient4Net/Clients/IrcClient.cs
@@ -44,10 +44,18 @@
             outputStream.Flush();

             connecting = true;
-            responseValidator.ValidateCommand(ReadIrcMessage(), Rfc2812CommandResponse.Welcome);
-            responseValidator.ValidateCommand(ReadIrcMessage(), Rfc2812CommandResponse.YourHost);
-            responseValidator.ValidateCommand(ReadIrcMessage(), Rfc2812CommandResponse.Created);
-            responseValidator.ValidateCommand(ReadIrcMessage(), Rfc2812CommandResponse.MyInfo);
+            try
+            {
+                responseValidator.ValidateCommand(ReadIrcMessage(), Rfc2812CommandResponse.Welcome);
+                responseValidator.ValidateCommand(ReadIrcMessage(), Rfc2812CommandResponse.YourHost);
+                responseValidator.ValidateCommand(ReadIrcMessage(), Rfc2812CommandResponse.Created);
+                responseValidator.ValidateCommand(ReadIrcMessage(), Rfc2812CommandResponse.MyInfo);
+            }
+            catch (ResponseValidationException ex)
+            {
+                throw new ApplicationException("Unable to establish a connection to the server");
+            }
+
             connecting = false;

             Connected = true;


fix BugTrapWebServer build

fix BugTrapWebServer build

--- source/Server/BugTrapWebServer/RequestHandler.aspx.cs
+++ source/Server/BugTrapWebServer/RequestHandler.aspx.cs
@@ -156,7 +156,7 @@
 					smtpClient = new SmtpClient(applicationSettings.SmtpHost, applicationSettings.SmtpPort);
 				else
 					smtpClient = new SmtpClient(applicationSettings.SmtpHost);
-				smtpClient.EnableSsl = this.applicationSettings.SmtpSSL;
+				smtpClient.EnableSsl = applicationSettings.SmtpSSL;
 				if (applicationSettings.SmtpUser != null)
 					smtpClient.Credentials = new NetworkCredential(applicationSettings.SmtpUser, applicationSettings.SmtpPassword);
 				smtpClient.Send(message);


fix copy/paste bug for user key parsing

fix copy/paste bug for user key parsing

--- source/AspNetIdentity/AspNetIdentityManagerService.cs
+++ source/AspNetIdentity/AspNetIdentityManagerService.cs
@@ -60,7 +60,7 @@
             var keyType = typeof(TUserKey);
             if (keyType == typeof(string)) ConvertUserSubjectToKey = subject => (TUserKey)ParseString(subject);
             else if (keyType == typeof(int)) ConvertUserSubjectToKey = subject => (TUserKey)ParseInt(subject);
-            else if (keyType == typeof(uint)) ConvertRoleSubjectToKey = subject => (TRoleKey)ParseUInt32(subject);
+            else if (keyType == typeof(uint)) ConvertUserSubjectToKey = subject => (TUserKey)ParseUInt32(subject);
             else if (keyType == typeof(long)) ConvertUserSubjectToKey = subject => (TUserKey)ParseLong(subject);
             else if (keyType == typeof(Guid)) ConvertUserSubjectToKey = subject => (TUserKey)ParseGuid(subject);
             else


Fix `NullReferenceException` when `IMemberAccessor` was not resolved Related to Handlebars-Net/Handlebars.Net/issues/399

--- source/Handlebars/ObjectDescriptors/ObjectAccessor.cs
+++ source/Handlebars/ObjectDescriptors/ObjectAccessor.cs
@@ -47,7 +47,15 @@
                 : null;

         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        public bool TryGetValue(ChainSegment segment, out object value) =>
-            _memberAccessor.TryGetValue(_data, segment, out value);
+        public bool TryGetValue(ChainSegment segment, out object value)
+        {
+            if (_memberAccessor == null)
+            {
+                value = null;
+                return false;
+            }
+
+            return _memberAccessor.TryGetValue(_data, segment, out value);
+        }
     }
 }


Revert admin routes in ContentTypes Startup.

--- src/Orchard.Cms.Web/Modules/Orchard.ContentTypes/Startup.cs
+++ src/Orchard.Cms.Web/Modules/Orchard.ContentTypes/Startup.cs
@@ -38,29 +38,22 @@
             routes.MapAreaRoute(
                 name: "EditField",
                 areaName: "Orchard.ContentTypes",
-                template: "Admin/ContentTypes/EditField/{id}/{name}",
+                template: "Admin/EditField/{id}/{name}",
                 defaults: new { controller = "Admin", action = "EditField" }
             );

             routes.MapAreaRoute(
                 name: "EditTypePart",
                 areaName: "Orchard.ContentTypes",
-                template: "Admin/ContentTypes/Edit/{id}/{name}",
+                template: "Admin/Edit/{id}/{name}",
                 defaults: new { controller = "Admin", action = "EditTypePart" }
             );

             routes.MapAreaRoute(
                 name: "RemovePart",
                 areaName: "Orchard.ContentTypes",
-                template: "Admin/ContentTypes/RemovePart/{id}/{name}",
+                template: "Admin/RemovePart/{id}/{name}",
                 defaults: new { controller = "Admin", action = "RemovePart" }
-            );
-
-            routes.MapAreaRoute(
-                name: "AdminContentTypes",
-                areaName: "Orchard.ContentTypes",
-                template: "Admin/ContentTypes/{action}",
-                defaults: new { controller = "Admin" }
             );
         }
     }


HTML elements should be replaced with a space instead of an empty string to ensure words stay apart

--- src/Skybrud.Umbraco.GridData/Values/GridControlHtmlValue.cs
+++ src/Skybrud.Umbraco.GridData/Values/GridControlHtmlValue.cs
@@ -51,7 +51,7 @@
         /// </summary>
         /// <returns>An instance of <see cref="string"/> with the value as a searchable text.</returns>
         public override string GetSearchableText() {
-            return Regex.Replace(Value, "<.*?>", "") + Environment.NewLine;
+            return Regex.Replace(Value, "<.*?>", " ") + Environment.NewLine;
         }

         /// <summary>


ExportFobSeeder - fix data for Arges, 201606


Avoid allocating ExceptionDispatchInfo and ObjectDisposedException when disposing SslStream

SslStream uses its _exception to track whether the instance has been disposed, storing an ObjectDisposedException into it when disposal happens.  We can instead just store a sentinel.

--- src/System.Net.Security/src/System/Net/Security/SslState.cs
+++ src/System.Net.Security/src/System/Net/Security/SslState.cs
@@ -77,12 +77,29 @@
             _innerStream = innerStream;
         }

+        /// <summary>Set as the _exception when the instance is disposed.</summary>
+        private static readonly ExceptionDispatchInfo s_disposedSentinel = ExceptionDispatchInfo.Capture(new ObjectDisposedException(nameof(SslStream)));
+
+        private void ThrowIfExceptional()
+        {
+            ExceptionDispatchInfo e = _exception;
+            if (e != null)
+            {
+                // If the stored exception just indicates disposal, throw a new ODE rather than the stored one,
+                // so as to not continually build onto the shared exception's stack.
+                if (ReferenceEquals(e, s_disposedSentinel))
+                {
+                    throw new ObjectDisposedException(nameof(SslStream));
+                }
+
+                // Throw the stored exception.
+                e.Throw();
+            }
+        }
+
         internal void ValidateCreateContext(SslClientAuthenticationOptions sslClientAuthenticationOptions)
         {
-            if (_exception != null)
-            {
-                _exception.Throw();
-            }
+            ThrowIfExceptional();

             if (Context != null && Context.IsValidContext)
             {
@@ -118,10 +135,7 @@

         internal void ValidateCreateContext(SslServerAuthenticationOptions sslServerAuthenticationOptions)
         {
-            if (_exception != null)
-            {
-                _exception.Throw();
-            }
+            ThrowIfExceptional();

             if (Context != null && Context.IsValidContext)
             {
@@ -401,7 +415,7 @@
             }
         }

-        private ExceptionDispatchInfo SetException(Exception e)
+        private void SetException(Exception e)
         {
             Debug.Assert(e != null, $"Expected non-null Exception to be passed to {nameof(SetException)}");

@@ -410,12 +424,7 @@
                 _exception = ExceptionDispatchInfo.Capture(e);
             }

-            if (_exception != null && Context != null)
-            {
-                Context.Close();
-            }
-
-            return _exception;
+            Context?.Close();
         }

         private bool HandshakeCompleted
@@ -436,10 +445,7 @@

         internal void CheckThrow(bool authSuccessCheck, bool shutdownCheck = false)
         {
-            if (_exception != null)
-            {
-                _exception.Throw();
-            }
+            ThrowIfExceptional();

             if (authSuccessCheck && !IsAuthenticated)
             {
@@ -467,7 +473,7 @@
         //
         internal void Close()
         {
-            _exception = ExceptionDispatchInfo.Capture(new ObjectDisposedException(nameof(SslStream)));
+            _exception = s_disposedSentinel;
             Context?.Close();
             _secureStream?.Dispose();
         }
@@ -666,14 +672,12 @@
                 _Framing = Framing.Unknown;
                 _handshakeCompleted = false;

-                if (SetException(e).SourceException == e)
-                {
-                    throw;
-                }
-                else
-                {
-                    _exception.Throw();
-                }
+                SetException(e);
+                if (_exception.SourceException != e)
+                {
+                   ThrowIfExceptional();
+                }
+                throw;
             }
             finally
             {
@@ -732,7 +736,8 @@
                 _Framing = Framing.Unknown;
                 _handshakeCompleted = false;

-                SetException(e).Throw();
+                SetException(e);
+                ThrowIfExceptional();
             }
         }


Re-enable tests that were blocked on #3610.

--- src/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs
+++ src/System.Net.Sockets/tests/FunctionalTests/SendReceive.cs
@@ -449,28 +449,24 @@
             Assert.Equal(sentChecksum.Sum, receivedChecksum.Sum);
         }

-        [ActiveIssue(3610)]
         [Fact]
         public void SendToRecvFromAsync_Single_Datagram_UDP_IPv6()
         {
             SendToRecvFromAsync_Datagram_UDP(IPAddress.IPv6Loopback, IPAddress.IPv6Loopback);
         }

-        [ActiveIssue(3610)]
         [Fact]
         public void SendToRecvFromAsync_Single_Datagram_UDP_IPv4()
         {
             SendToRecvFromAsync_Datagram_UDP(IPAddress.Loopback, IPAddress.Loopback);
         }

-        [ActiveIssue(3610)]
         [Fact]
         public void SendToRecvFromAsync_UdpClient_Single_Datagram_UDP_IPv6()
         {
             SendToRecvFromAsync_UdpClient_Datagram_UDP(IPAddress.IPv6Loopback, IPAddress.IPv6Loopback);
         }

-        [ActiveIssue(3610)]
         [Fact]
         public void SendToRecvFromAsync_UdpClient_Single_Datagram_UDP_IPv4()
         {


Add more tests for Assembly.LoadFrom

Add more tests for Assembly.LoadFrom

--- src/System.Runtime/tests/System/Reflection/AssemblyTests.cs
+++ src/System.Runtime/tests/System/Reflection/AssemblyTests.cs
@@ -28,6 +28,7 @@

         string sourceTestAssemblyPath = Path.Combine(Environment.CurrentDirectory, "TestAssembly.dll");
         string destTestAssemblyPath = Path.Combine(Environment.CurrentDirectory, "TestAssembly", "TestAssembly.dll");
+        string loadFromTestPath;

         public AssemblyTests()
         {
@@ -37,6 +38,9 @@
                 Directory.CreateDirectory(Path.GetDirectoryName(destTestAssemblyPath));
                 File.Move(sourceTestAssemblyPath, destTestAssemblyPath);
             }
+            string currAssemblyPath = typeof(AssemblyTests).Assembly.Location;
+            loadFromTestPath = Path.Combine(Path.GetDirectoryName(currAssemblyPath), "TestAssembly", Path.GetFileName(currAssemblyPath));
+            File.Copy(currAssemblyPath, loadFromTestPath, true);
         }

         public void Dispose()
@@ -324,6 +328,13 @@
             Assert.Throws<ArgumentNullException>("assemblyFile", () => Assembly.LoadFrom(null));
             var assem1 = Assembly.LoadFrom(destTestAssemblyPath);
             Assert.Equal(assem, assem1);
+
+            assem = Assembly.LoadFrom(typeof(AssemblyTests).Assembly.Location);
+            Assert.Equal(assem, typeof(AssemblyTests).Assembly);
+
+            // Test that loading assembly of same identity as TPA returns TPA assembly even if paths differ
+            assem1 = Assembly.LoadFrom(loadFromTestPath);
+            Assert.Equal(assem, assem1);
         }

         [Fact]


fix or better reason for test failure

fix or better reason for test failure

--- src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs
+++ src/System.Security.Cryptography.Xml/tests/SignedXmlTest.cs
@@ -164,7 +164,7 @@
             Assert.Throws<CryptographicException>(() => signedXml.ComputeSignature());
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact]
         public void AsymmetricRSASignature()
         {
             SignedXml signedXml = MSDNSample();
@@ -188,7 +188,7 @@

             Assert.Null(signedXml.SigningKeyName);
             Assert.Equal(SignedXml.XmlDsigRSASHA1Url, signedXml.SignatureMethod);
-            Assert.Equal(128, signedXml.SignatureValue.Length);
+            Assert.Equal(key.KeySize / 8, signedXml.SignatureValue.Length);
             Assert.Null(signedXml.SigningKeyName);

             // Get the XML representation of the signature.
@@ -284,7 +284,7 @@
             Assert.True(v1.CheckSignature());
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact]
         public void AsymmetricDSASignature()
         {
             SignedXml signedXml = MSDNSample();
@@ -552,7 +552,7 @@
             Assert.Throws<CryptographicException>(() => signedXml.ComputeSignature());
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact(Skip = "https://github.com/dotnet/corefx/issues/16685")]
         public void DataReferenceToNonDataObject()
         {
             XmlDocument doc = new XmlDocument();
@@ -625,7 +625,7 @@
             return sw.ToString();
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact(Skip = "https://github.com/dotnet/corefx/issues/16685")]
         public void GetIdElement_Null()
         {
             SignedXml sign = new SignedXml();
@@ -1347,7 +1347,7 @@
             sign.CheckSignature(new HMACSHA1(Encoding.ASCII.GetBytes("secret")));
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact(Skip = "https://github.com/dotnet/corefx/issues/16685")]
         public void HmacMustBeMultipleOfEightBits()
         {
             for (int i = 1; i < 160; i++)
@@ -1360,7 +1360,7 @@
             }
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact(Skip = "https://github.com/dotnet/corefx/issues/16685")]
         public void VerifyHMAC_ZeroLength()
         {
             string xml = @"<?xml version=""1.0"" encoding=""UTF-8""?>
@@ -1388,7 +1388,7 @@
             CheckErratum(sign, new HMACSHA1(Encoding.ASCII.GetBytes("secret")), "4");
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact(Skip = "https://github.com/dotnet/corefx/issues/16685")]
         public void VerifyHMAC_SmallerThanMinimumLength()
         {
             // 72 is a multiple of 8 but smaller than the minimum of 80 bits
@@ -1397,7 +1397,7 @@
             CheckErratum(sign, new HMACSHA1(Encoding.ASCII.GetBytes("secret")), "72");
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact(Skip = "https://github.com/dotnet/corefx/issues/16685")]
         public void VerifyHMAC_MinimumLength()
         {
             // 80 bits is the minimum (and the half-size of HMACSHA1)
@@ -1406,7 +1406,7 @@
             Assert.True(sign.CheckSignature(new HMACSHA1(Encoding.ASCII.GetBytes("secret"))));
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact(Skip = "https://github.com/dotnet/corefx/issues/16685")]
         public void VerifyHMAC_SmallerHalfLength()
         {
             // 80bits is smaller than the half-size of HMACSHA256
@@ -1415,7 +1415,7 @@
             CheckErratum(sign, new HMACSHA256(Encoding.ASCII.GetBytes("secret")), "80");
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact(Skip = "https://github.com/dotnet/corefx/issues/16685")]
         public void VerifyHMAC_HalfLength()
         {
             // 128 is the half-size of HMACSHA256
@@ -1432,7 +1432,7 @@
             Assert.True(sign.CheckSignature(new HMACSHA1(Encoding.ASCII.GetBytes("secret"))));
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact(Skip = "https://github.com/dotnet/corefx/issues/16685")]
         public void VerifyHMAC_HMACOutputLength_Signature_Mismatch()
         {
             string xml = @"<?xml version=""1.0"" encoding=""UTF-8""?>
@@ -1456,7 +1456,7 @@
             Assert.Throws<CryptographicException>(() => sign.CheckSignature(new HMACSHA1(Encoding.ASCII.GetBytes("no clue"))));
         }

-        [Fact(Skip = "TODO: fix me")]
+        [Fact(Skip = "https://github.com/dotnet/corefx/issues/16685")]
         public void VerifyHMAC_HMACOutputLength_Invalid()
         {
             string xml = @"<?xml version=""1.0"" encoding=""UTF-8""?>


Fix deployments being unfinishable

Fix deployments being unfinishable

--- src/Tgstation.Server.Host/Components/Compiler/DreamMaker.cs
+++ src/Tgstation.Server.Host/Components/Compiler/DreamMaker.cs
@@ -317,7 +317,7 @@
 					{
 						for (var I = 0; I < 99; ++I)
 						{
-							await Task.Delay(sleepInterval, cancellationToken).ConfigureAwait(false);
+							await Task.Delay(sleepInterval, progressCts.Token).ConfigureAwait(false);
 							progressReporter(I + 1);
 						}
 					}


Fix bug in Error class related to compare with None

--- GitMind/Utils/Error.cs
+++ GitMind/Utils/Error.cs
@@ -7,7 +7,7 @@
 {
 	public class Error : Equatable<Error>
 	{
-		private static readonly string none = "none";
+		private static readonly Exception noneException = new Exception("none");
 		private readonly Exception exception = null;

 		private Error(string message = null)
@@ -29,7 +29,7 @@
 				Message = exception.Message;
 			}

-			if (message != none)
+			if (exception != noneException)
 			{
 				Log.Warn($"Error: {Message}");
 			}
@@ -44,7 +44,7 @@

 		public static Error From(string message = "") => new Error(message);

-		public static Error None = new Error(none);
+		public static Error None = new Error(noneException);

 		public bool Is<T>()
@@ -55,6 +55,12 @@

 		protected override bool IsEqual(Error other)
 		{
+			if ((ReferenceEquals(this, None) && !ReferenceEquals(other, None))
+			    || !ReferenceEquals(this, None) && ReferenceEquals(other, None))
+			{
+				return false;
+			}
+
 			return
 				(exception == null && other.exception == null && GetType() == other.GetType())
 				|| other.GetType().IsInstanceOfType(this)


Make BasicAuth sample self-contained

Make BasicAuth sample self-contained

--- eg/Program.cs
+++ eg/Program.cs
@@ -253,14 +253,13 @@
                           .ReturnErroneousFetch()
             select new { e.StatusCode, e.ReasonPhrase };

-        static readonly Uri HttpbinBasicAuthUrl = new Uri("http://httpbin.org/basic-auth/user/passwd");
-
         static IObservable<object> BasicAuth() =>

-            from fst in Http.Get(HttpbinBasicAuthUrl)
+            from url in Observable.Return(new Uri("http://httpbin.org/basic-auth/user/passwd"))
+            from fst in Http.Get(url)
                             .ReturnErroneousFetch()
             from snd in fst.Client.WithConfig(fst.Client.Config.WithCredentials(new NetworkCredential("user", "passwd")))
-                       .Get(HttpbinBasicAuthUrl)
+                       .Get(url)
             select new
             {
                 First  = new { fst.StatusCode, fst.ReasonPhrase },


update cake build script to have clearer dependency among tasks

--- build.cake.cs
+++ build.cake.cs
@@ -28,11 +28,13 @@
   });

 Task("Restore")
+  .IsDependentOn("Clean")
   .Does(() => {
     DotNetCoreRestore(solutionFile);
   });

 Task("Build")
+  .IsDependentOn("Restore")
   .Does(() =>
   {
     var settings = new DotNetCoreBuildSettings
@@ -51,8 +53,6 @@
   });

 Task("Default")
-  .IsDependentOn("Clean")
-  .IsDependentOn("Restore")
   .IsDependentOn("Test");

 RunTarget(target);


Added non-throwin AccessCheckWithResultList.

--- NtApiDotNet/NtSecurity.cs
+++ NtApiDotNet/NtSecurity.cs
@@ -408,6 +408,25 @@
                     privs = list.AddResource(new SafePrivilegeSetBuffer(buffer_length));
                 }
             }
+        }
+
+        /// <summary>
+        /// Do an access check between a security descriptor and a token to determine the allowed access.
+        /// This function returns a list of results rather than a single entry. It should only be used
+        /// with object types.
+        /// </summary>
+        /// <param name="sd">The security descriptor</param>
+        /// <param name="token">The access token.</param>
+        /// <param name="desired_access">The set of access rights to check against</param>
+        /// <param name="principal">An optional principal SID used to replace the SELF SID in a security descriptor.</param>
+        /// <param name="generic_mapping">The type specific generic mapping (get from corresponding NtType entry).</param>
+        /// <param name="object_types">List of object types to check against.</param>
+        /// <returns>The list of access check results.</returns>
+        /// <exception cref="NtException">Thrown if an error occurred in the access check.</exception>
+        public static AccessCheckResult[] AccessCheckWithResultList(SecurityDescriptor sd, NtToken token,
+            AccessMask desired_access, Sid principal, GenericMapping generic_mapping, IEnumerable<ObjectTypeEntry> object_types)
+        {
+            return AccessCheckWithResultList(sd, token, desired_access, principal, generic_mapping, object_types, true).Result;
         }

         /// <summary>


Reenable translations in the loading scene

--- LanguagePatches/LanguagePatches.cs
+++ LanguagePatches/LanguagePatches.cs
@@ -225,9 +225,6 @@
         /// </summary>
         public void UpdateText()
         {
-            if (HighLogic.LoadedScene == GameScenes.LOADING)
-                return;
-
             // Patch all Unity UI Texts
             foreach (Text text in Resources.FindObjectsOfTypeAll<Text>())
             {
@@ -254,9 +251,6 @@
         /// </summary>
         public void UpdateImages()
         {
-            if (HighLogic.LoadedScene == GameScenes.LOADING)
-                return;
-
             // Patch all Unity UI Images
             foreach (Material mat in Resources.FindObjectsOfTypeAll<Material>())
             {
@@ -280,9 +274,6 @@
         /// </summary>
         public void UpdateTextMesh()
         {
-            if (HighLogic.LoadedScene == GameScenes.LOADING)
-                return;
-
             // Patch all TextMeshs
             foreach (TextMesh text in Resources.FindObjectsOfTypeAll<TextMesh>())
             {
@@ -322,9 +313,6 @@
         /// </summary>
         public void UpdateTextMeshPro()
         {
-            if (HighLogic.LoadedScene == GameScenes.LOADING)
-                return;
-
             // Patch all TextMeshs
             foreach (TMP_Text text in Resources.FindObjectsOfTypeAll<TMP_Text>())
             {
@@ -362,9 +350,6 @@
         /// </summary>
         public void PopupDialogUpdate()
         {
-            if (HighLogic.LoadedScene == GameScenes.LOADING)
-                return;
-
             // Patch all PopupDialogs
             foreach (PopupDialog dialog in Resources.FindObjectsOfTypeAll<PopupDialog>())
             {


Spit out markdown, catch some errors

Spit out markdown, catch some errors

--- OrbitalCommand/Program.cs
+++ OrbitalCommand/Program.cs
@@ -1,6 +1,30 @@
-using System;
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2013 Sandy Armstrong <sanfordarmstrong@gmail.com>
+//
+
+using System;
+using System.Collections.Generic;
 using System.Text;
 using System.Text.RegularExpressions;
+
 using LibGit2Sharp;

 namespace OrbitalCommand
@@ -11,44 +35,75 @@
 		{
 			if (args.Length != 1)
 			{
-				Console.WriteLine("Too few arguments");
+				Console.WriteLine("Wrong number of arguments");
 				return;
 			}
 			var until = args[0];

-			using (var repo = new Repository(Environment.CurrentDirectory))
+			try
 			{
-				var filter = new CommitFilter
+				using (var repo = new Repository(Environment.CurrentDirectory))
+				{
+					CommitFilter filter;
+					try
 					{
-						Until = repo.Tags[until],
-						Since = repo.Head,
-						SortBy = CommitSortStrategies.Time
-					};
+						filter = new CommitFilter
+							{
+								// TODO: Allow any commitish value here
+								Until = repo.Tags[until],
+								Since = repo.Head,
+								SortBy = CommitSortStrategies.Time
+							};
+					}
+					catch (LibGit2SharpException)
+					{
+						Console.WriteLine("{0} does not appear to be a valid tag ref", until);
+						return;
+					}

-				var regex = new Regex (@"Fixes:.+\?(?<bugNum>.....)", RegexOptions.Multiline | RegexOptions.Compiled);
-
-				foreach (var commit in repo.Commits.QueryBy(filter))
-				{
-					var change = new StringBuilder(commit.MessageShort);
-					var matches = regex.Matches(commit.Message);
-					if (matches.Count > 0)
+					var regex = new Regex(@"Fixes:\s*(?<bugUrl>http\S+\?(?<bugNum>\d+))",
+					                      RegexOptions.Multiline | RegexOptions.Compiled);
+
+					var idToUrl = new Dictionary<string, string>();
+
+					foreach (var commit in repo.Commits.QueryBy(filter))
 					{
-						change.Append(" (");
-						var first = true;
-						foreach (Match match in matches)
+						var change = new StringBuilder("* ");
+						change.Append(commit.MessageShort);
+						var matches = regex.Matches(commit.Message);
+						if (matches.Count > 0)
 						{
-							if (!first)
-								change.Append(", ");
-							change.Append(match.Groups["bugNum"].Value);
-							first = false;
+							change.Append(" (");
+							var first = true;
+							foreach (Match match in matches)
+							{
+								var bugNum = match.Groups["bugNum"].Value;
+								var bugUrl = match.Groups["bugUrl"].Value;
+								idToUrl[bugNum] = bugUrl;
+
+								if (!first)
+									change.Append(", ");
+								change.Append(String.Format("[{0}][{0}]", bugNum));
+								first = false;
+							}
+							change.Append(")");
 						}
-						change.Append(")");
+						Console.WriteLine(change);
 					}
-					Console.WriteLine(change);
+
+					Console.WriteLine();
+
+					foreach (var pair in idToUrl)
+					{
+						Console.WriteLine("[{0}]: {1}", pair.Key, pair.Value);
+					}
 				}
 			}
-
-			Console.ReadLine();
+			catch (RepositoryNotFoundException)
+			{
+				Console.WriteLine("Please run from within a git repository");
+				return;
+			}
 		}
 	}
 }


Version Update for PROSnorlax (#118)

Version Update for PROSnorlax (#118)

New Version Update for PROSnorlax

--- PROProtocol/GameClient.cs
+++ PROProtocol/GameClient.cs
@@ -97,7 +97,7 @@
         public event Action<List<Pokemon>> PCBoxUpdated;
         public event Action<string> LogMessage;

-        private const string Version = "Spooky";
+        private const string Version = "XMAS2017";

         private GameConnection _connection;
         private DateTime _lastMovement;


Suppress spam

Suppress spam

--- PROProtocol/GameClient.cs
+++ PROProtocol/GameClient.cs
@@ -252,7 +252,7 @@

             if (!_movementTimeout.IsActive && _movements.Count > 0)
             {
-                if (GroundMount != null && !IsBiking && !IsSurfing && Map.IsOutside)
+                if (GroundMount != null && !_itemUseTimeout.IsActive && !IsBiking && !IsSurfing && Map.IsOutside)
                 {
                     LogMessage?.Invoke($"Mounting [{GroundMount.Name}]");
                     UseItem(GroundMount.Id);


Enable now passing test assertion

Enable now passing test assertion

--- LibGit2Sharp.Tests/StashFixture.cs
+++ LibGit2Sharp.Tests/StashFixture.cs
@@ -196,8 +196,7 @@
                 var stasher = Constants.Signature;
                 var stash = repo.Stashes.Add(stasher, "This stash includes ignore files", StashModifiers.IncludeIgnored);

-                //TODO : below assertion doesn't pass. Bug?
-                //Assert.False(File.Exists(ignoredFilePath));
+                Assert.False(File.Exists(Path.Combine(repo.Info.WorkingDirectory, ignoredFilename)));

                 var blob = repo.Lookup<Blob>("stash^3:ignored_file.txt");
                 Assert.NotNull(blob);


Improved labelling

Improved labelling

--- src/AppShell.NativeMaps.Mobile.iOS/MapViewDelegate.cs
+++ src/AppShell.NativeMaps.Mobile.iOS/MapViewDelegate.cs
@@ -24,8 +24,7 @@
             if (annotation is MarkerAnnotation)
             {
                 Marker marker = (annotation as MarkerAnnotation).Marker;
-
-                MKAnnotationView annotationView = mapView.DequeueReusableAnnotation(annotationId);
+                MKAnnotationView annotationView = marker == null || (!marker.Draggable && marker.Label == null) ? mapView.DequeueReusableAnnotation(annotationId) : null;

                 if (annotationView == null)
                     annotationView = string.IsNullOrEmpty(marker.Icon) ? new MKPinAnnotationView(annotation, annotationId) : new MKAnnotationView(annotation, annotationId);


string bugfix

string bugfix

--- ParserTests/WhileTests.cs
+++ ParserTests/WhileTests.cs
@@ -298,8 +298,8 @@
     while i < 11 do
     (
     r := r * i;
-    print "".r;
-    print "".i;
+    print """".r;
+    print """".i;
     i := i + 1 );
 return r
 )";


Clone fielddef.FieldOffset.

Clone fielddef.FieldOffset.

--- src/AsmResolver.DotNet/Cloning/MemberCloner.Fields.cs
+++ src/AsmResolver.DotNet/Cloning/MemberCloner.Fields.cs
@@ -1,9 +1,3 @@
-using System;
-using System.Collections.Generic;
-using AsmResolver.DotNet.Code.Cil;
-using AsmResolver.DotNet.Collections;
-using AsmResolver.PE.DotNet.Cil;
-
 namespace AsmResolver.DotNet.Cloning
 {
     public partial class MemberCloner
@@ -48,6 +42,7 @@
             clonedField.Constant = CloneConstant(context, field.Constant);
             clonedField.FieldRva = FieldRvaCloner.CloneFieldRvaData(field);
             clonedField.MarshalDescriptor = CloneMarshalDescriptor(context, field.MarshalDescriptor);
+            clonedField.FieldOffset = field.FieldOffset;
         }

     }