Add check for both IsPlural and IsSingular for nouns

--- Rules/UseSingularNouns.cs
+++ Rules/UseSingularNouns.cs
@@ -49,7 +49,7 @@
                     String noun = funcNamePieces[1];
                     var ps = System.Data.Entity.Design.PluralizationServices.PluralizationService.CreateService(CultureInfo.GetCultureInfo("en-us"));

-                    if (!ps.IsSingular(noun))
+                    if (!ps.IsSingular(noun) && ps.IsPlural(noun))
                     {
                         yield return new DiagnosticRecord(string.Format(CultureInfo.CurrentCulture, Strings.UseSingularNounsError, funcAst.Name),
                             funcAst.Extent, GetName(), DiagnosticSeverity.Warning, fileName);


update annotation

update annotation

update annotation

--- UartOscilloscope/Form1.cs
+++ UartOscilloscope/Form1.cs
@@ -100,11 +100,11 @@
 		public static int loop_num;												//	宣告loop_num全域靜態變數，供迴圈使用
 		delegate void Display(byte[] buffer);									//	定義Display型態
 		//delegate 是可用來封裝具名方法或匿名方法的參考型別。
-		public Form1()															//	宣告Form1
-		{																		//	進入Form1(由Program.cs呼叫執行)
+		public Form1()															//	宣告Form1副程式
+		{																		//	進入Form1(由Program.cs的Main呼叫執行)
 			InitializeComponent();												//	呼叫InitializeComponent副程式(於Form1.Designer.cs中)初始化表單
 			Error_Code = 0;														//	初始化Error_Code為0
-		}																		//	結束Form1
+		}																		//	結束Form1副程式
 		public void Form1_Load(object sender, EventArgs e)						//	Form1_Load程式，Form1表單載入時執行
 		{																		//	進入Form1_Load副程式
 			timer1.Interval = 100;												//	設定timer1執行頻率


fixed using "this" in overridings of Equals/GetHeashCode/ToString in structs

--- RunSharpShared/CodeGen.cs
+++ RunSharpShared/CodeGen.cs
@@ -111,7 +111,17 @@
 			if (Context.IsStatic)
 				throw new InvalidOperationException(Properties.Messages.ErrCodeStaticThis);

-			return new ContextualOperand(new _Arg(0, Context.OwnerType), TypeMapper);
+		    Type ownerType = Context.OwnerType;
+
+		    if (Context.OwnerType.IsValueType)
+		    {
+		        var m = Context.Member as MethodInfo;
+		        if (m != null && m.IsVirtual)
+		            ownerType = ownerType.MakeByRefType();
+		    }
+
+		    Operand arg = new _Arg(0, ownerType);
+            return new ContextualOperand(arg, TypeMapper);
 		}

 		public ContextualOperand Base()


Added unit tests for OpenPgpContext ArgumentExceptions

--- UnitTests/PgpMimeTests.cs
+++ UnitTests/PgpMimeTests.cs
@@ -483,5 +483,99 @@
 				}
 			}
 		}
+
+		[Test]
+		public void TestSupports ()
+		{
+			var supports = new [] { "application/pgp-encrypted", "application/pgp-signature", "application/pgp-keys",
+				"application/x-pgp-encrypted", "application/x-pgp-signature", "application/x-pgp-keys" };
+
+			using (var ctx = new DummyOpenPgpContext ()) {
+				for (int i = 0; i < supports.Length; i++)
+					Assert.IsTrue (ctx.Supports (supports[i]), supports[i]);
+
+				Assert.IsFalse (ctx.Supports ("application/octet-stream"), "application/octet-stream");
+				Assert.IsFalse (ctx.Supports ("text/plain"), "text/plain");
+			}
+		}
+
+		[Test]
+		public void TestArgumentExceptions ()
+		{
+			using (var ctx = new DummyOpenPgpContext ()) {
+				var mailboxes = new [] { new MailboxAddress ("MimeKit UnitTests", "mimekit@example.com") };
+				var emptyMailboxes = new MailboxAddress[0];
+				var pubkeys = ctx.GetPublicKeys (mailboxes);
+				var key = ctx.GetSigningKey (mailboxes[0]);
+				var emptyPubkeys = new PgpPublicKey[0];
+				var stream = new MemoryStream ();
+
+				// Decrypt
+				Assert.Throws<ArgumentNullException> (() => ctx.Decrypt (null), "Decrypt");
+
+				// Encrypt
+				Assert.Throws<ArgumentNullException> (() => ctx.Encrypt (EncryptionAlgorithm.Cast5, (MailboxAddress[]) null, stream), "Encrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.Encrypt (EncryptionAlgorithm.Cast5, (PgpPublicKey[]) null, stream), "Encrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.Encrypt ((MailboxAddress[]) null, stream), "Encrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.Encrypt ((PgpPublicKey[]) null, stream), "Encrypt");
+				Assert.Throws<ArgumentException> (() => ctx.Encrypt (EncryptionAlgorithm.Cast5, emptyMailboxes, stream), "Encrypt");
+				Assert.Throws<ArgumentException> (() => ctx.Encrypt (EncryptionAlgorithm.Cast5, emptyPubkeys, stream), "Encrypt");
+				Assert.Throws<ArgumentException> (() => ctx.Encrypt (emptyMailboxes, stream), "Encrypt");
+				Assert.Throws<ArgumentException> (() => ctx.Encrypt (emptyPubkeys, stream), "Encrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.Encrypt (EncryptionAlgorithm.Cast5, mailboxes, null), "Encrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.Encrypt (EncryptionAlgorithm.Cast5, pubkeys, null), "Encrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.Encrypt (mailboxes, null), "Encrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.Encrypt (pubkeys, null), "Encrypt");
+
+				// Export
+				Assert.Throws<ArgumentNullException> (() => ctx.Export ((PgpPublicKeyRingBundle) null), "Export");
+				Assert.Throws<ArgumentNullException> (() => ctx.Export ((MailboxAddress[]) null), "Export");
+				Assert.Throws<ArgumentNullException> (() => ctx.Export ((PgpPublicKey[]) null), "Export");
+
+				// GetDecryptedStream
+				Assert.Throws<ArgumentNullException> (() => ctx.GetDecryptedStream (null), "GetDecryptedStream");
+
+				// GetDigestAlgorithmName
+				Assert.Throws<ArgumentOutOfRangeException> (() => ctx.GetDigestAlgorithmName (DigestAlgorithm.None), "GetDigestAlgorithmName");
+
+				// Import
+				Assert.Throws<ArgumentNullException> (() => ctx.Import (null), "Import");
+
+				// ImportSecretKeys
+				Assert.Throws<ArgumentNullException> (() => ctx.ImportSecretKeys (null), "ImportSecretKeys");
+
+				// Sign
+				Assert.Throws<ArgumentNullException> (() => ctx.Sign ((MailboxAddress) null, DigestAlgorithm.Sha1, stream), "Sign");
+				Assert.Throws<ArgumentNullException> (() => ctx.Sign ((PgpSecretKey) null, DigestAlgorithm.Sha1, stream), "Sign");
+				Assert.Throws<ArgumentNullException> (() => ctx.Sign (mailboxes[0], DigestAlgorithm.Sha1, null), "Sign");
+				Assert.Throws<ArgumentNullException> (() => ctx.Sign (key, DigestAlgorithm.Sha1, null), "Sign");
+
+				// SignAndEncrypt
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt ((MailboxAddress) null, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, mailboxes, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt ((PgpSecretKey) null, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, pubkeys, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, (MailboxAddress[]) null, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt (key, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, (PgpPublicKey[]) null, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentException> (() => ctx.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, emptyMailboxes, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentException> (() => ctx.SignAndEncrypt (key, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, emptyPubkeys, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, mailboxes, null), "SignAndEncrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt (key, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, pubkeys, null), "SignAndEncrypt");
+
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt ((MailboxAddress) null, DigestAlgorithm.Sha1, mailboxes, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt ((PgpSecretKey) null, DigestAlgorithm.Sha1, pubkeys, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, (MailboxAddress[]) null, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt (key, DigestAlgorithm.Sha1, (PgpPublicKey[]) null, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentException> (() => ctx.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, emptyMailboxes, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentException> (() => ctx.SignAndEncrypt (key, DigestAlgorithm.Sha1, emptyPubkeys, stream), "SignAndEncrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, mailboxes, null), "SignAndEncrypt");
+				Assert.Throws<ArgumentNullException> (() => ctx.SignAndEncrypt (key, DigestAlgorithm.Sha1, pubkeys, null), "SignAndEncrypt");
+
+				// Supports
+				Assert.Throws<ArgumentNullException> (() => ctx.Supports (null), "Supports");
+
+				// Verify
+				Assert.Throws<ArgumentNullException> (() => ctx.Verify (null, stream), "Verify");
+				Assert.Throws<ArgumentNullException> (() => ctx.Verify (stream, null), "Verify");
+			}
+		}
 	}
 }


Added ArgumentException unit tests for MultipartEncrypted.SignAndEncrypt()

--- UnitTests/PgpMimeTests.cs
+++ UnitTests/PgpMimeTests.cs
@@ -732,6 +732,52 @@
 				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.Encrypt (ctx, EncryptionAlgorithm.Cast5, (PgpPublicKey[]) null, entity));
 				Assert.Throws<ArgumentException> (() => MultipartEncrypted.Encrypt (ctx, EncryptionAlgorithm.Cast5, emptyPubkeys, entity));
 				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.Encrypt (ctx, EncryptionAlgorithm.Cast5, pubkeys, null));
+
+				// SignAndEncrypt
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt ((MailboxAddress) null, DigestAlgorithm.Sha1, mailboxes, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, null, entity));
+				Assert.Throws<ArgumentException> (() => MultipartEncrypted.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, emptyMailboxes, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, mailboxes, null));
+
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt ((PgpSecretKey) null, DigestAlgorithm.Sha1, pubkeys, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (key, DigestAlgorithm.Sha1, null, entity));
+				Assert.Throws<ArgumentException> (() => MultipartEncrypted.SignAndEncrypt (key, DigestAlgorithm.Sha1, emptyPubkeys, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (key, DigestAlgorithm.Sha1, pubkeys, null));
+
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (null, mailboxes[0], DigestAlgorithm.Sha1, mailboxes, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, (MailboxAddress) null, DigestAlgorithm.Sha1, mailboxes, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, mailboxes[0], DigestAlgorithm.Sha1, null, entity));
+				Assert.Throws<ArgumentException> (() => MultipartEncrypted.SignAndEncrypt (ctx, mailboxes[0], DigestAlgorithm.Sha1, emptyMailboxes, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, mailboxes[0], DigestAlgorithm.Sha1, mailboxes, null));
+
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (null, key, DigestAlgorithm.Sha1, pubkeys, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, (PgpSecretKey) null, DigestAlgorithm.Sha1, pubkeys, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, key, DigestAlgorithm.Sha1, null, entity));
+				Assert.Throws<ArgumentException> (() => MultipartEncrypted.SignAndEncrypt (ctx, key, DigestAlgorithm.Sha1, emptyPubkeys, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, key, DigestAlgorithm.Sha1, pubkeys, null));
+
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt ((MailboxAddress) null, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, mailboxes, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, null, entity));
+				Assert.Throws<ArgumentException> (() => MultipartEncrypted.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, emptyMailboxes, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (mailboxes[0], DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, mailboxes, null));
+
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt ((PgpSecretKey) null, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, pubkeys, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (key, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, null, entity));
+				Assert.Throws<ArgumentException> (() => MultipartEncrypted.SignAndEncrypt (key, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, emptyPubkeys, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (key, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, pubkeys, null));
+
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (null, mailboxes[0], DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, mailboxes, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, (MailboxAddress) null, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, mailboxes, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, mailboxes[0], DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, null, entity));
+				Assert.Throws<ArgumentException> (() => MultipartEncrypted.SignAndEncrypt (ctx, mailboxes[0], DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, emptyMailboxes, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, mailboxes[0], DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, mailboxes, null));
+
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (null, key, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, pubkeys, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, (PgpSecretKey) null, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, pubkeys, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, key, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, null, entity));
+				Assert.Throws<ArgumentException> (() => MultipartEncrypted.SignAndEncrypt (ctx, key, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, emptyPubkeys, entity));
+				Assert.Throws<ArgumentNullException> (() => MultipartEncrypted.SignAndEncrypt (ctx, key, DigestAlgorithm.Sha1, EncryptionAlgorithm.Cast5, pubkeys, null));
+
 			}
 		}
 	}


Delete unused and worthless Localizer class which conflicts with the Localizer class in Paratext.

--- SIL.Scripture/Localize.cs
+++ SIL.Scripture/Localize.cs
@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace NetLoc
-{
-	public class Localizer
-	{
-		public static string Str(string text)
-		{
-			return text;
-		}
-	}
-}


Updated for Pre-Alpha 6

Updated for Pre-Alpha 6

--- ScenarioGenerator/Main.cs
+++ ScenarioGenerator/Main.cs
@@ -29,6 +29,8 @@
             get { return "Genarates Scenarios. Press F8 to open menu."; }
         }

+        public string Identifier { get; set; }
+
         #endregion
     }
 }


Makes the Razor parsing parallel again

Makes the Razor parsing parallel again

--- src/Wyam.Razor/Razor.cs
+++ src/Wyam.Razor/Razor.cs
@@ -183,7 +183,7 @@
             IRazorPageFactoryProvider pageFactoryProvider = services.GetRequiredService<IRazorPageFactoryProvider>();
             IRazorCompilationService razorCompilationService = services.GetRequiredService<IRazorCompilationService>();
             IHostingEnvironment hostingEnviornment = services.GetRequiredService<IHostingEnvironment>();
-            return validInputs/*.AsParallel()*/.Select(input =>
+            return validInputs.AsParallel().Select(input =>
             {
                 Trace.Verbose("Compiling Razor for {0}", input.SourceString());
                 string relativePath = GetRelativePath(input, context);


SerializableDictionary doesn't really work right now. I think it's because the generic types prevents JsonUtility from serializing the class.

--- SerializableDictionary.cs
+++ SerializableDictionary.cs
@@ -13,6 +13,8 @@
     public Dictionary<K, int> Dictionary {
         get { if (_Dictionary == null) { PrepareDictionary(); } return _Dictionary; }
     }
+
+    public SerializableDictionary() { }

     public void PrepareDictionary() {
         _Dictionary = new Dictionary<K, int>();


Fixed the test to pass on MS.NET

Fixed the test to pass on MS.NET

git-svn-id: 5f83b1c70de5d206063ccb651337b8c9002d45c3@42 0d1dca7f-3429-0410-b39c-edaab0c29397

--- tests/Microsoft.Xna.Framework/Graphics/DisplayModeTests.cs
+++ tests/Microsoft.Xna.Framework/Graphics/DisplayModeTests.cs
@@ -51,7 +51,7 @@
         {
             DisplayMode mode = new DisplayMode();
             Assert.AreEqual(mode.RefreshRate, 0, "#1");
-            Assert.AreEqual(mode.Format, (SurfaceFormat)0, "#2");
+            Assert.AreEqual(SurfaceFormat.Unknown, mode.Format, "#2");
             Assert.AreEqual(mode.Height, 0, "#3");
             Assert.AreEqual(mode.Width, 0, "#4");
         }


IModifiableEntity

IModifiableEntity

--- Signum.Entities/Entity.cs
+++ Signum.Entities/Entity.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using Signum.Utilities;
@@ -202,7 +202,7 @@
     }

     [InTypeScript(false)]
-    public interface IEntity : INotifyPropertyChanged, IDataErrorInfo, IRootEntity
+    public interface IEntity : IModifiableEntity, IRootEntity
     {
         PrimaryKey Id { get; }


Bug fixed: ahora FindOptions incluye el Top en su ToString

(TFS CS 6183)

--- Signum.Web/FindOptions.cs
+++ Signum.Web/FindOptions.cs
@@ -105,6 +105,7 @@

             string options = new Sequence<string>
             {
+                Top.HasValue ? "sfTop=" + Top.Value : null,
                 SearchOnLoad ? "sfSearchOnLoad=true" : null,
                 !Create ? "sfCreate=false": null,
                 !View ? "sfView=false": null,


Registers ITopicSubscriptionProvisioner in the cronusSettings

--- src/PushNotifications.WS/PushNotificationStartup.cs
+++ src/PushNotifications.WS/PushNotificationStartup.cs
@@ -308,6 +308,7 @@
         static ICronusSettings UseMultiTenantDelivery(this ICronusSettings cronusSettings, Pandora pandora)
         {
             cronusSettings.Container.RegisterSingleton<IDeliveryProvisioner>(() => new PandoraMultiTenantDeliveryProvisioner(pandora), Name);
+            cronusSettings.Container.RegisterSingleton<ITopicSubscriptionProvisioner>(() => new PandoraMultiTenantDeliveryProvisioner(pandora), Name);
             return cronusSettings;
         }
     }


more string changes and adding a video for appservices

--- SimpleWAWS/Default.cshtml
+++ SimpleWAWS/Default.cshtml
@@ -7,8 +7,13 @@

Create your temporary App Service app

-
Azure App Service is a cloud app service that integrates everything you need to quickly and easily build web and mobile apps for any platform or device.

-
Be our guest for up to an hour of temporary sandboxed Azure App Service experience with no Azure subscription, free of charge and commitment. Stay longer for the full Azure App Service experience with an Azure free trial subscription.

+
Azure App Service is a cloud app service that integrates everything you need to quickly and easily build web and mobile apps for any platform or device.

+
Be our guest for up to an hour of temporary sandboxed Azure App Service experience with no Azure subscription, free of charge and commitment. Stay longer for the full Azure App Service experience with an Azure free trial subscription.

+

+

+           <video width="440" controls poster="/Content/poster2.png" preload="none">
+                <source src="/Content/AppService.mp4" type="video/mp4">
+            </video>

@@ -263,7 +268,7 @@

2) Try it now for free

The sandboxed API app experience is not here yet.

-
Create web, mobile, logic, and API apps. Sign up for a free 30-day trial and create up to 10 apps of any type for free.

+
You can still create API apps by signing up for a free 30-day trial and create up to 10 apps of any type for free.

             Free trial

@@ -272,7 +277,7 @@

2) Try it now for free

The sandboxed logic app experience is not here yet.

-
Create web, mobile, logic, and API apps. Sign up for a free 30-day trial and create up to 10 apps of any type for free.

+
You can still create logic apps by signing up for a free 30-day trial and create up to 10 apps of any type for free.

             Free trial


Fix #259: Invalid error squiggle on ||

Fix #259: Invalid error squiggle on ||

--- src/R/Core/Impl/AST/Expressions/ExpressionParser.cs
+++ src/R/Core/Impl/AST/Expressions/ExpressionParser.cs
@@ -375,8 +375,9 @@
             //
             // is not a function call operator over b[1].

-            if (!context.Tokens.IsLineBreakAfter(context.TextProvider, tokens.Position - 1))
-            {
+            if (_operands.Count > 1 && _operands.Count > 0)
+            {
+                // We are not in the beginning of the expression
                 if (tokens.PreviousToken.TokenType == RTokenType.CloseBrace ||
                     tokens.PreviousToken.TokenType == RTokenType.CloseSquareBracket ||
                     tokens.PreviousToken.TokenType == RTokenType.CloseSquareBracket ||


Mitigate timeout issues in Unit Tests related to Slack API throttling (properly close socket and add extra delay between each test in Connect test class)

--- SlackAPI.Tests/Connect.cs
+++ SlackAPI.Tests/Connect.cs
@@ -10,30 +10,38 @@
 namespace SlackAPI.Tests
 {
     [Collection("Integration tests")]
-    public class Connect
+    public class Connect : IDisposable
     {
         const string TestText = "Test :D";
         private readonly IntegrationFixture fixture;

+        private SlackSocketClient slackClient;
+
         public Connect(IntegrationFixture fixture)
         {
             this.fixture = fixture;
+
+            // Extra wait to mitigate Slack throttling
+            Thread.Sleep(2000);
+        }
+
+        public void Dispose()
+        {
+            slackClient?.CloseSocket();
         }

         [Fact]
         public void TestConnectAsUser()
         {
-            var client = this.fixture.CreateUserClient();
-            Assert.True(client.IsConnected, "Invalid, doesn't think it's connected.");
-            client.CloseSocket();
+            slackClient = this.fixture.CreateUserClient();
+            Assert.True(slackClient.IsConnected, "Invalid, doesn't think it's connected.");
         }

         [Fact]
         public void TestConnectAsBot()
         {
-            var client = this.fixture.CreateBotClient();
-            Assert.True(client.IsConnected, "Invalid, doesn't think it's connected.");
-            client.CloseSocket();
+            slackClient = this.fixture.CreateBotClient();
+            Assert.True(slackClient.IsConnected, "Invalid, doesn't think it's connected.");
         }

         [Fact]
@@ -48,12 +56,12 @@
         public void TestConnectPostAndDelete()
         {
             // given
-            SlackSocketClient client = this.fixture.CreateUserClient();
+            slackClient = this.fixture.CreateUserClient();
             string channel = this.fixture.Config.TestChannel;

             // when
-            DateTime messageTimestamp = PostMessage(client, channel);
-            DeletedResponse deletedResponse = DeleteMessage(client, channel, messageTimestamp);
+            DateTime messageTimestamp = PostMessage(slackClient, channel);
+            DeletedResponse deletedResponse = DeleteMessage(slackClient, channel, messageTimestamp);

             // then
             Assert.NotNull(deletedResponse);
@@ -66,7 +74,6 @@
         public void TestConnectGetPresenceChanges()
         {
             // Arrange
-            SlackSocketClient client;
             int presenceChangesRaisedCount = 0;
             using (var sync = new InSync(nameof(TestConnectGetPresenceChanges), this.fixture.ConnectionTimeout))
             {
@@ -79,37 +86,37 @@
                 }

                 // Act
-                client = this.fixture.CreateUserClient(maintainPresenceChangesStatus: true, presenceChanged: OnPresenceChanged);
+                slackClient = this.fixture.CreateUserClient(maintainPresenceChangesStatus: true, presenceChanged: OnPresenceChanged);
             }

             // Assert
-            Assert.True(client.Users.All(x => x.presence != null));
+            Assert.True(slackClient.Users.All(x => x.presence != null));
         }

         [Fact(Skip = "Not stable on AppVeyor")]
         public void TestManualSubscribePresenceChangeAndManualPresenceChange()
         {
             // Arrange
-            SlackSocketClient client = this.fixture.CreateUserClient();
+            slackClient = this.fixture.CreateUserClient();
             using (var sync = new InSync())
             {
-                client.OnPresenceChanged += x =>
+                slackClient.OnPresenceChanged += x =>
                 {
-                    if (x.user == client.MySelf.id)
+                    if (x.user == slackClient.MySelf.id)
                     {
                         // Assert
                         sync.Proceed();
                     }
                 };

-                client.SubscribePresenceChange(client.MySelf.id);
+                slackClient.SubscribePresenceChange(slackClient.MySelf.id);
             }

             using (var sync = new InSync())
             {
-                client.OnPresenceChanged += x =>
+                slackClient.OnPresenceChanged += x =>
                 {
-                    if (x is ManualPresenceChange && x.user == client.MySelf.id)
+                    if (x is ManualPresenceChange && x.user == slackClient.MySelf.id)
                     {
                         // Assert
                         sync.Proceed();
@@ -117,8 +124,8 @@
                 };

                 // Act
-                client.EmitPresence(x => x.AssertOk(), Presence.away);
-                client.EmitPresence(x => x.AssertOk(), Presence.auto);
+                slackClient.EmitPresence(x => x.AssertOk(), Presence.away);
+                slackClient.EmitPresence(x => x.AssertOk(), Presence.auto);
             }
         }


pattern matching

pattern matching

--- src/Radical/ChangeTracking/ChangeTrackingService.cs
+++ src/Radical/ChangeTracking/ChangeTrackingService.cs
@@ -1001,8 +1001,7 @@
              * test(s), quindi le Dispose vengono chiamate in ordine casuale dal
              * GC...
              */
-            IComponent cmp = entity as IComponent;
-            if (cmp != null)
+            if (entity is IComponent cmp)
             {
                 cmp.Disposed -= onComponentDisposed;
                 if (iComponentEntities != null && iComponentEntities.Contains(cmp))
@@ -1376,8 +1375,7 @@
                 state |= EntityPropertyStates.Changed;

                 TProperty actualValue;
-                var e = entity as Model.Entity;
-                if (e != null)
+                if (entity is Model.Entity e)
                 {
                     actualValue = e.GetPropertyValue<TProperty>(propertyName);
                 }


Unit test for AddScriptWithoutTransform. References  #91

--- src/React.Tests/Core/JavaScriptEngineFactoryTest.cs
+++ src/React.Tests/Core/JavaScriptEngineFactoryTest.cs
@@ -7,6 +7,7 @@
  *  of patent rights can be found in the PATENTS file in the same directory.
  */

+using System.Collections.Generic;
 using System.Threading;
 using JavaScriptEngineSwitcher.Core;
 using Moq;
@@ -20,6 +21,8 @@
 		private JavaScriptEngineFactory CreateFactory()
 		{
 			var config = new Mock<IReactSiteConfiguration>();
+			config.Setup(x => x.ScriptsWithoutTransform).Returns(new List<string>());
+			config.Setup(x => x.LoadReact).Returns(true);
 			var fileSystem = new Mock<IFileSystem>();
 			var registration = new JavaScriptEngineFactory.Registration
 			{
@@ -81,5 +84,31 @@
 			Assert.AreEqual(engine1, engine3);
 			factory.DisposeEngineForCurrentThread();
 		}
+
+		[Test]
+		public void ShouldLoadFilesThatDoNotRequireTransform()
+		{
+			var jsEngine = new Mock<IJsEngine>();
+			jsEngine.Setup(x => x.Evaluate<int>("1 + 1")).Returns(2);
+
+			var config = new Mock<IReactSiteConfiguration>();
+			config.Setup(x => x.ScriptsWithoutTransform).Returns(new List<string> { "First.js", "Second.js" });
+			config.Setup(x => x.LoadReact).Returns(true);
+
+			var fileSystem = new Mock<IFileSystem>();
+			fileSystem.Setup(x => x.ReadAsString(It.IsAny<string>())).Returns<string>(path => "CONTENTS_" + path);
+
+			var registration = new JavaScriptEngineFactory.Registration
+			{
+				Factory = () => jsEngine.Object,
+				Priority = 1
+			};
+			var factory = new JavaScriptEngineFactory(new[] { registration }, config.Object, fileSystem.Object);
+
+			factory.GetEngineForCurrentThread();
+
+			jsEngine.Verify(x => x.Execute("CONTENTS_First.js"));
+			jsEngine.Verify(x => x.Execute("CONTENTS_Second.js"));
+		}
 	}
 }


LVL up des batiments

LVL up des batiments

prix
lvl
effets

--- theNextStep/Assets/Scripts/Buildings/ProductionAndNeeds.cs
+++ theNextStep/Assets/Scripts/Buildings/ProductionAndNeeds.cs
@@ -50,6 +50,21 @@
 	[HideInInspector]
 	public bool
 		_buildingElectricity = true;
+
+	public int Level {
+		get{ return _level;}
+		set {
+			if (_level > _maxLevel) {
+				_level = _maxLevel;
+			} else {
+				_level = Level;
+			}
+		}
+	}
+
+	public int _level = 1;
+	public int _maxLevel = 5;
+
 	// Use this for initialization
 	void Start ()
 	{
@@ -104,11 +119,11 @@
 	void needs ()
 	{
 		if (_waterNeedsPerDay != 0) {
-			Camera.main.GetComponent<gameStats> ()._actualWater -= ((_waterNeedsPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime);
+			Camera.main.GetComponent<gameStats> ()._actualWater -= ((_waterNeedsPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime) * ((_level / 2) + 1);
 		}

 		if (_electricityNeedsPerDay != 0) {
-			Camera.main.GetComponent<gameStats> ()._actualElectricity -= ((_electricityNeedsPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime);
+			Camera.main.GetComponent<gameStats> ()._actualElectricity -= ((_electricityNeedsPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime) * ((_level / 2) + 1);
 		}

 		/*if (_CO2NeedsPerDay != 0) {
@@ -116,7 +131,7 @@
 		}*/

 		if (_O2NeedsPerDay != 0) {
-			Camera.main.GetComponent<gameStats> ()._actualOxygen -= ((_O2NeedsPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime);
+			Camera.main.GetComponent<gameStats> ()._actualOxygen -= ((_O2NeedsPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime) * ((_level / 2) + 1);
 		}

 		/*if (_mineralsNeedsPerDay != 0) {
@@ -124,7 +139,7 @@
 		}*/

 		if (_foodNeedsPerDay != 0) {
-			Camera.main.GetComponent<gameStats> ()._actualFood -= ((_foodNeedsPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime);
+			Camera.main.GetComponent<gameStats> ()._actualFood -= ((_foodNeedsPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime) * ((_level / 2) + 1);
 		}
 	}
 	#endregion
@@ -133,11 +148,11 @@
 	void production ()
 	{
 		if (_waterProductionPerDay != 0) {
-			Camera.main.GetComponent<gameStats> ()._actualWater += ((_actualWaterProductionPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime);
+			Camera.main.GetComponent<gameStats> ()._actualWater += ((_actualWaterProductionPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime) * _level;
 		}

 		if (_electricityProductionPerDay != 0) {
-			Camera.main.GetComponent<gameStats> ()._actualElectricity += ((_actualElectricityProductionPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime);
+			Camera.main.GetComponent<gameStats> ()._actualElectricity += ((_actualElectricityProductionPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime) * _level;
 		}

 		/*if (_CO2NeedsPerDay != 0) {
@@ -145,7 +160,7 @@
 		}*/

 		if (_O2ProductionPerDay != 0) {
-			Camera.main.GetComponent<gameStats> ()._actualOxygen += ((_actualO2ProductionPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime);
+			Camera.main.GetComponent<gameStats> ()._actualOxygen += ((_actualO2ProductionPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime) * _level;
 		}

 		/*if (_mineralsProductionPerDay != 0) {
@@ -153,9 +168,16 @@
 		}*/

 		if (_foodProductionPerDay != 0) {
-			Camera.main.GetComponent<gameStats> ()._actualFood += ((_actualFoodProductionPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime);
+			Camera.main.GetComponent<gameStats> ()._actualFood += ((_actualFoodProductionPerDay / (Camera.main.GetComponent<DayNightController> ().secondsInFullDay / Camera.main.GetComponent<DayNightController> ().timeMultiplier)) * Time.deltaTime) * _level;
 		}
 	}
 	#endregion
+
+	//Cette fonction est appellee pour lvl up!
+	public void lvlUp ()
+	{
+		_level ++;
+		Camera.main.GetComponent<gameStats> ()._actualUpgradeMaterials -= 200;
+	}

 }


bugfix regarding keygen for inherited classes

--- src/Tools/SoodaStubGen/CodeDomClassStubGenerator.cs
+++ src/Tools/SoodaStubGen/CodeDomClassStubGenerator.cs
@@ -70,6 +70,14 @@
             this.KeyGen = keyGen;
         }

+        private ClassInfo GetRootClass(ClassInfo ci)
+        {
+            if (ci.InheritsFromClass != null)
+                return GetRootClass(ci.InheritsFromClass);
+            else
+                return ci;
+        }
+
         public CodeMemberField Field_keyGenerator() {
             CodeMemberField field = new CodeMemberField("IPrimaryKeyGenerator", "keyGenerator");
             field.Attributes = MemberAttributes.Private | MemberAttributes.Static;
@@ -81,7 +89,7 @@

             case "integer":
                 field.InitExpression = new CodeObjectCreateExpression("Sooda.ObjectMapper.KeyGenerators.TableBasedGenerator",
-                                       new CodePrimitiveExpression(classInfo.Name),
+                                       new CodePrimitiveExpression(GetRootClass(classInfo).Name),
                                        new CodeMethodInvokeExpression(
                                            new CodeMethodInvokeExpression(
                                                new CodeTypeReferenceExpression("_DatabaseSchema"), "GetSchema"),


Mark as public all symbol keys methods we expect other components to use.

--- src/Workspaces/Core/Portable/SymbolKey/SymbolKey.cs
+++ src/Workspaces/Core/Portable/SymbolKey/SymbolKey.cs
@@ -119,7 +119,7 @@
         /// <summary>
         /// Constructs a new <see cref="SymbolKey"/> representing the provided <paramref name="symbol"/>.
         /// </summary>
-        internal static SymbolKey Create(ISymbol symbol, CancellationToken cancellationToken = default)
+        public static SymbolKey Create(ISymbol symbol, CancellationToken cancellationToken = default)
             => new SymbolKey(CreateString(symbol, cancellationToken));

         /// <summary>
@@ -135,10 +135,10 @@
         /// <c>A</c> and <c>X.SomeClass</c> from assembly <c>B</c> will be considered the same
         /// effective symbol.
         /// </param>
-        internal static IEqualityComparer<SymbolKey> GetComparer(bool ignoreCase = false, bool ignoreAssemblyKeys = false)
+        public static IEqualityComparer<SymbolKey> GetComparer(bool ignoreCase = false, bool ignoreAssemblyKeys = false)
             => SymbolKeyComparer.GetComparer(ignoreCase, ignoreAssemblyKeys);

-        internal static SymbolKeyResolution ResolveString(
+        public static SymbolKeyResolution ResolveString(
             string symbolKey, Compilation compilation,
             bool ignoreAssemblyKey = false, CancellationToken cancellationToken = default)
         {
@@ -155,7 +155,7 @@
             return result;
         }

-        internal static string CreateString(ISymbol symbol, CancellationToken cancellationToken = default)
+        public static string CreateString(ISymbol symbol, CancellationToken cancellationToken = default)
             => CreateStringWorker(FormatVersion, symbol, cancellationToken);

         // Internal for testing purposes.


Update helper

Update helper

--- src/Workspaces/Core/Portable/Workspace/Workspace.cs
+++ src/Workspaces/Core/Portable/Workspace/Workspace.cs
@@ -200,6 +200,7 @@
         {
             return SetCurrentSolution(
                 transformation,
+                onBeforeUpdate: static (_, _) => { },
                 onAfterUpdate: static (_, _) => { },
                 kind, projectId, documentId);
         }
@@ -207,6 +208,7 @@
         /// <inheritdoc cref="SetCurrentSolution(Func{Solution, Solution}, WorkspaceChangeKind, ProjectId?, DocumentId?)"/>
         private bool SetCurrentSolution(
             Func<Solution, Solution> transformation,
+            Action<Solution, Solution> onBeforeUpdate,
             Action<Solution, Solution> onAfterUpdate,
             WorkspaceChangeKind kind,
             ProjectId? projectId = null,
@@ -214,6 +216,10 @@
         {
             return SetCurrentSolution(
                 static (oldSolution, data) => data.transformation(oldSolution),
+                static (oldSolution, newSolution, data) =>
+                {
+                    data.onBeforeUpdate(oldSolution, newSolution);
+                },
                 static (oldSolution, newSolution, data) =>
                 {
                     data.onAfterUpdate(oldSolution, newSolution);
@@ -223,22 +229,28 @@
                     // as the order of the changes made to the solution.
                     data.@this.RaiseWorkspaceChangedEventAsync(data.kind, oldSolution, newSolution, data.projectId, data.documentId);
                 },
-                (@this: this, transformation, onAfterUpdate, kind, projectId, documentId));
+                (@this: this, transformation, onBeforeUpdate, onAfterUpdate, kind, projectId, documentId));
         }

         /// <summary>
         /// Applies specified transformation to <see cref="CurrentSolution"/>, updates <see cref="CurrentSolution"/> to
-        /// the new value and performs a requested callback immediately after that update.
+        /// the new value and performs a requested callback immediately before and after that update.  The callbacks
+        /// will be invoked atomically while while <see cref="_serializationLock"/> is being held.
         /// </summary>
         /// <param name="transformation">Solution transformation.</param>
+        /// <param name="onBeforeUpdate">Action to perform immediately prior to updating <see cref="CurrentSolution"/>.
+        /// The action will be passed the old <see cref="CurrentSolution"/> that will be replaced and the exact solution
+        /// it will be replaced with. The latter may be different than the solution returned by <paramref
+        /// name="transformation"/> as it will have its <see cref="Solution.WorkspaceVersion"/> updated
+        /// accordingly.</param>
         /// <param name="onAfterUpdate">Action to perform once <see cref="CurrentSolution"/> has been updated.  The
         /// action will be passed the old <see cref="CurrentSolution"/> that was just replaced and the exact solution it
         /// was replaced with. The latter may be different than the solution returned by <paramref
-        /// name="transformation"/> as it will have its <see cref="Solution.WorkspaceVersion"/> updated accordingly.
-        /// Updating the solution and invoking <paramref name="onAfterUpdate"/> will happen atomically while <see
-        /// cref="_serializationLock"/> is being held.</param>
+        /// name="transformation"/> as it will have its <see cref="Solution.WorkspaceVersion"/> updated
+        /// accordingly.</param>
         private bool SetCurrentSolution<TData>(
             Func<Solution, TData, Solution> transformation,
+            Action<Solution, Solution, TData> onBeforeUpdate,
             Action<Solution, Solution, TData> onAfterUpdate,
             TData data)
         {
@@ -266,6 +278,10 @@
                     }

                     newSolution = newSolution.WithNewWorkspace(this, oldSolution.WorkspaceVersion + 1);
+
+                    // Prior to updating the latest solution, let the caller do any other state updates they want.
+                    onBeforeUpdate(oldSolution, newSolution, data);
+
                     _latestSolution = newSolution;

                     // Once we've updated _latesSolution, perform any requested callbacks.


Revert "Attempt at drop/create on Staging Server"

This reverts commit c1c55021b563eebe83fcf28aaeeeed8985d10b39.

--- AllReadyApp/Web-App/AllReady/Startup.cs
+++ AllReadyApp/Web-App/AllReady/Startup.cs
@@ -35,7 +35,8 @@
             var builder = new ConfigurationBuilder()
                 .SetBasePath(appEnv.ApplicationBasePath)
                 .AddJsonFile("config.json")
-                .AddJsonFile($"config.{env.EnvironmentName}.json", optional: true);
+                      .AddJsonFile($"config.{env.EnvironmentName}.json", optional: true)
+                      .AddEnvironmentVariables();

             if (env.IsDevelopment())
             {
@@ -235,16 +236,10 @@

             // Add sample data and test admin accounts if specified in Config.Json.
             // for production applications, this should either be set to false or deleted.
-            if (env.IsDevelopment())
+            if (env.IsDevelopment() || env.IsEnvironment("Staging"))
             {
                 context.Database.Migrate();
             }
-            else if (env.IsEnvironment("Staging"))
-            {
-                context.Database.EnsureDeleted();
-                context.Database.Migrate();
-            }
-
             if (Configuration["Data:InsertSampleData"] == "true")
             {
                 sampleData.InsertTestData();


Inject environment info into layout

Inject environment info into layout

--- Altairis.AskMe.Web/Pages/_Layout.cshtml
+++ Altairis.AskMe.Web/Pages/_Layout.cshtml
@@ -1,4 +1,5 @@
-<!DOCTYPE html>
+@inject Microsoft.AspNetCore.Hosting.IHostingEnvironment Environment
+<!DOCTYPE html>

     <meta name="viewport" content="width=device-width" />
@@ -30,7 +31,7 @@
         @RenderBody()

-
Copyright © Altairis, 2017

+
Copyright © Altairis, 2017 | @Environment.EnvironmentName environment


Исправлена ошибка загрузки Image

Исправлена ошибка загрузки Image

--- Source/Utils/Resources.cs
+++ Source/Utils/Resources.cs
@@ -227,6 +227,8 @@

             Image image = new Image();
             image.Source = bitmap;
+            image.Width = bitmap.PixelWidth;
+            image.Height = bitmap.PixelHeight;

             return image;
         }


Prevent name clash

Prevent name clash

--- AngleSharp.Scripting/DomNodeInstance.cs
+++ AngleSharp.Scripting/DomNodeInstance.cs
@@ -88,7 +88,16 @@
                 var names = method.GetCustomAttributes<DomNameAttribute>();

                 foreach (var name in names.Select(m => m.OfficialName))
+                {
+                    //TODO
+                    // If it already has a property with the given name (usually another method),
+                    // then convert that method to a two-layer method, which decides which one
+                    // to pick depending on the number (and probably types) of arguments.
+                    if (HasProperty(name))
+                        continue;
+
                     FastAddProperty(name, new DomFunctionInstance(this, method), false, false, false);
+                }
             }
         }


Cleanup some comments.

Cleanup some comments.

--- Assets/Editor/MeshCreatorUndoManager.cs
+++ Assets/Editor/MeshCreatorUndoManager.cs
@@ -21,13 +21,15 @@
     // CONSTRUCTOR
     // ***********************************************************************************

-    /// Creates a new HOEditorUndoManager,
+    /// Creates a new MeshCreatorUndoManager,
     /// setting it so that the target is marked as dirty each time a new undo is stored.
+    /// params:
     /// The default Object you want to save undo info for.
     /// The default name of the thing to undo (displayed as "Undo [name]" in the main menu).
     public MeshCreatorUndoManager(Object p_target, string p_name) : this(p_target, p_name, true) { }

-    /// Creates a new HOEditorUndoManager.
+    /// Creates a new MeshCreatorUndoManager.
+    /// params:
     /// The default Object you want to save undo info for.
     /// The default name of the thing to undo (displayed as "Undo [name]" in the main menu).
     /// If TRUE, marks the target as dirty each time a new undo is stored.
@@ -47,14 +49,14 @@

     /// Call this method BEFORE any undoable UnityGUI call.
     /// Manages undo for the given target, with the default name.
+    /// params:
     /// The object you want to save undo info for.
     public void CheckUndo(Object p_target) { CheckUndo(p_target, defName); }

     /// Call this method BEFORE any undoable UnityGUI call.
     /// Manages undo for the given target, with the given name.
-
+    /// params:
     /// The object you want to save undo info for.
-
     /// The name of the thing to undo (displayed as "Undo [name]" in the main menu).
     public void CheckUndo(Object p_target, string p_name)
     {
@@ -95,12 +97,14 @@
     /// Call this method AFTER any undoable UnityGUI call.
     /// Manages undo for the given target, with the default name,
     /// and returns a value of TRUE if the target is marked as dirty.
+    /// params:
     /// The object you want to save undo info for.
     public bool CheckDirty(Object p_target) { return CheckDirty(p_target, defName); }

     /// Call this method AFTER any undoable UnityGUI call.
     /// Manages undo for the given target, with the given name,
     /// and returns a value of TRUE if the target is marked as dirty.
+    /// params:
     /// The object you want to save undo info for.
     /// The name of the thing to undo (displayed as "Undo [name]" in the main menu).
     public bool CheckDirty(Object p_target, string p_name)
@@ -120,13 +124,13 @@
     /// Forces undo for the default target, with the default name.
     /// Used to undo operations that are performed by pressing a button,
     /// which doesn't set the GUI to a changed state.
-
     public void ForceDirty() { ForceDirty(defTarget, defName); }

     /// Call this method AFTER any undoable UnityGUI call.
     /// Forces undo for the given target, with the default name.
     /// Used to undo operations that are performed by pressing a button,
     /// which doesn't set the GUI to a changed state.
+    /// params:
     /// The object you want to save undo info for.
     public void ForceDirty(Object p_target) { ForceDirty(p_target, defName); }

@@ -134,7 +138,7 @@
     /// Forces undo for the given target, with the given name.
     /// Used to undo operations that are performed by pressing a button,
     /// which doesn't set the GUI to a changed state.
-
+    /// params:
     /// The object you want to save undo info for.
     /// The name of the thing to undo (displayed as "Undo [name]" in the main menu).
     public void ForceDirty(Object p_target, string p_name)


Made ClearItems into a single clear operation. (ClearItem)

--- WvsMapleNpcs/NpcScript.cs
+++ WvsMapleNpcs/NpcScript.cs
@@ -238,14 +238,12 @@
         public bool HasItem(int ID, int amount) { return Talker.Inventory.HasItem(ID, amount); }

         /// <summary>
-        /// Clears all items of the specified item ID's in the talkers inventory.
-        /// </summary>
-        /// <param name="ID">The maple id of the item.</param>
-        public void ClearItems(params int[] ID)
-        {
-            foreach (int id in ID)
-            {
-            }
+        /// Clears all items of the specified item ID in the talkers inventory.
+        /// </summary>
+        /// <param name="ID">The maple id of the item.</param>
+        public void ClearItem(int ID)
+        {
+            Talker.Inventory.ClearItem(ID);
             Talker.Notify(string.Format("Cleared all {0}.", ID));
         }


performance: get near in transforms

performance: get near in transforms

--- Xwt/Xwt.Drawing/Matrix.cs
+++ Xwt/Xwt.Drawing/Matrix.cs
@@ -297,11 +297,18 @@
 			double x;
 			double y;
 			var len = points.Length;
+			var m11 = this.M11;
+			var m12 = this.M12;
+			var m21 = this.M21;
+			var m22 = this.M22;
+			var offsetX = this.OffsetX;
+			var offsetY = this.OffsetY;
+
 			for (int i = 0; i < len; i++) {
 				x = points [i].X;
 				y = points [i].Y;
-				points [i].X = x * M11 + y * M21 + OffsetX;
-				points [i].Y = x * M12 + y * M22 + OffsetY;
+				points [i].X = x * m11 + y * m21 + offsetX;
+				points [i].Y = x * m12 + y * m22 + offsetY;
 			}
 		}

@@ -315,11 +322,16 @@
 			double x;
 			double y;
 			var len = vectors.Length;
+			var m11 = this.M11;
+			var m12 = this.M12;
+			var m21 = this.M21;
+			var m22 = this.M22;
+
 			for (int i = 0; i < len; i++) {
 				x = vectors [i].X;
 				y = vectors [i].Y;
-				vectors [i].X = x * M11 + y * M21;
-				vectors [i].Y = x * M12 + y * M22;
+				vectors [i].X = x * m11 + y * m21;
+				vectors [i].Y = x * m12 + y * m22;
 			}
 		}


vsi-lldb: rename Launch API flag

vsi-lldb: rename Launch API flag

GitOrigin-RevId: d41b8d2dadb1255f28f663f358cb1ef2d9665305

--- YetiVSI/OptionPageGrid.cs
+++ YetiVSI/OptionPageGrid.cs
@@ -189,7 +189,7 @@
         public SymbolServerFeatureFlag SymbolServerSupport { get; set; }

         [Category("LLDB Debugger")]
-        [DisplayName("Enable launch anywhere")]
+        [DisplayName("Enable new launch flow")]
         [Description("If enabled, the game is launched via the new Launch Game API.")]
         [TypeConverter(typeof(FeatureFlagConverter))]
         [DefaultValue(LunchGameApiFlowFlag.DEFAULT)]


catch exception and print some error.

catch exception and print some error.

--- YubicoDotNetTest/Form1.cs
+++ YubicoDotNetTest/Form1.cs
@@ -70,12 +70,23 @@
             {
                 client.setNonce(nonce);
             }
-            YubicoResponse response = client.verify(otp);
-            if (response != null)
+            try
             {
-                output.Text = response.getStatus().ToString() + "\r\n" +
-                    response.getPublicId() + "\r\n" +
-                    response.getUseCounter() + " " + response.getSessionCounter();
+                YubicoResponse response = client.verify(otp);
+                if (response != null)
+                {
+                    output.Text = response.getStatus().ToString() + "\r\n" +
+                        response.getPublicId() + "\r\n" +
+                        response.getUseCounter() + " " + response.getSessionCounter();
+                }
+                else
+                {
+                    output.Text = "Null result returned, error in call";
+                }
+            }
+            catch (YubicoValidationFailure yvf)
+            {
+                output.Text = "Failure in validation: " + yvf.Message;
             }
         }
     }


Provide sensible default values for Akka.Persistence circuit breaker configuration values (#4666)

Co-authored-by: Aaron Stannard <5a7a6a189b47cd31d24667a751e4003cd04eced5@petabridge.com>

--- src/core/Akka.Persistence/Snapshot/SnapshotStore.cs
+++ src/core/Akka.Persistence/Snapshot/SnapshotStore.cs
@@ -39,9 +39,9 @@
             var config = extension.ConfigFor(Self);
             _breaker = CircuitBreaker.Create(
                 Context.System.Scheduler,
-                config.GetInt("circuit-breaker.max-failures", 0),
-                config.GetTimeSpan("circuit-breaker.call-timeout", null),
-                config.GetTimeSpan("circuit-breaker.reset-timeout", null));
+                config.GetInt("circuit-breaker.max-failures", 10),
+                config.GetTimeSpan("circuit-breaker.call-timeout", TimeSpan.FromSeconds(10)),
+                config.GetTimeSpan("circuit-breaker.reset-timeout", TimeSpan.FromSeconds(30)));
         }

         /// <inheritdoc/>


Avoiding overriding files when not necessary

--- src/core/Bari.Core/cs/Build/Cache/FileBuildCache.cs
+++ src/core/Bari.Core/cs/Build/Cache/FileBuildCache.cs
@@ -6,6 +6,7 @@
 using System.Threading;
 using Bari.Core.Build.Dependencies.Protocol;
 using Bari.Core.Generic;
+using MD5 = System.Security.Cryptography.MD5;

 namespace Bari.Core.Build.Cache
 {
@@ -15,6 +16,8 @@
     /// </summary>
     public class FileBuildCache : IBuildCache
     {
+        private readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof (FileBuildCache));
+
         private const string DepsFileName = ".deps";
         private const string NamesFileName = ".names";

@@ -164,9 +167,7 @@
                                     // It is possible that only a file name (a virtual file) was cached without any contents:
                                     if (cacheDir.Exists(cacheFileName))
                                     {
-                                        using (var source = cacheDir.ReadBinaryFile(cacheFileName))
-                                        using (var target = targetRoot.CreateBinaryFileWithDirectories(fullPath))
-                                            StreamOperations.Copy(source, target);
+                                        CopyIfDifferent(cacheDir, cacheFileName, targetRoot, fullPath);
                                     }

                                     result.Add(new TargetRelativePath(relativeRoot, relativePath));
@@ -184,6 +185,52 @@
             finally
             {
                 lck.ExitReadLock();
+            }
+        }
+
+        /// <summary>
+        /// Copies a source file to a target location, but only if it does not exist yet, with the same MD5 checksum
+        /// as the source
+        /// </summary>
+        /// <param name="sourceDirectory">Source root directory</param>
+        /// <param name="sourceFileName">Source file's relative path</param>
+        /// <param name="targetRoot">Target root directory</param>
+        /// <param name="targetRelativePath">Target file's relative path</param>
+        private void CopyIfDifferent(IFileSystemDirectory sourceDirectory, string sourceFileName, IFileSystemDirectory targetRoot, string targetRelativePath)
+        {
+            bool copy = true;
+            long sourceSize = sourceDirectory.GetFileSize(sourceFileName);
+            if (targetRoot.Exists(targetRelativePath))
+            {
+                long targetSize = targetRoot.GetFileSize(targetRelativePath);
+                if (sourceSize == targetSize)
+                {
+                    byte[] sourceChecksum = ComputeChecksum(sourceDirectory, sourceFileName);
+                    byte[] targetChecksum = ComputeChecksum(targetRoot, targetRelativePath);
+
+                    copy = !sourceChecksum.SequenceEqual(targetChecksum);
+                }
+            }
+
+            if (copy)
+            {
+                using (var source = sourceDirectory.ReadBinaryFile(sourceFileName))
+                using (var target = targetRoot.CreateBinaryFileWithDirectories(targetRelativePath))
+                    StreamOperations.Copy(source, target);
+            }
+            else
+            {
+                log.DebugFormat("File {0} is the same as the cached one", targetRelativePath);
+            }
+        }
+
+        private byte[] ComputeChecksum(IFileSystemDirectory root, string path)
+        {
+            using (var stream = root.ReadBinaryFile(path))
+            using (var bufferedStream = new BufferedStream(stream, 1048576))
+            using (var md5 = MD5.Create())
+            {
+                return md5.ComputeHash(bufferedStream);
             }
         }


Set SharedDrawManager to null when disposing

My game on Android crashed when I went to another Activity and came back, because of a check if the GraphicsDevice is null:

See InitializeMainWindow(CCSize windowSizeInPixels, bool isFullscreen = false) on line 557.

--- src/platform/CCApplication.cs
+++ src/platform/CCApplication.cs
@@ -639,6 +639,15 @@
         {
             CCLabelBMFont.PurgeCachedData();
         }
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                CCDrawManager.SharedDrawManager = null;
+            }
+            base.Dispose(disposing);
+        }

         #endregion Cleaning up

@@ -1386,4 +1395,4 @@
             return null;
         }
     }
-}+}


Invalidate the loaded assembly cache on assembly load event.

--- src/AssemblyLoader.cs
+++ src/AssemblyLoader.cs
@@ -798,6 +798,17 @@
         {
             AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
             AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += CurrentDomain_ReflectionOnlyAssemblyResolve;
+            AppDomain.CurrentDomain.AssemblyLoad += CurrentDomain_AssemblyLoad;
+        }
+
+        private static void CurrentDomain_AssemblyLoad(object sender, AssemblyLoadEventArgs args)
+        {
+            var assembly = args.LoadedAssembly;
+            if (!assembly.IsDynamic && !assembly.ReflectionOnly)
+            {
+                // Reset the cache
+                _loadedAssemblyCache = null;
+            }
         }

         static Dictionary<string, Assembly> LoadedAssemblyCache


feat(Common.Convert): 完善转换的功能。 :fearful:

--- src/Common/Convert.cs
+++ src/Common/Convert.cs
@@ -87,11 +87,21 @@

 			try
 			{
-				//获取指定的类型转换器
-				var converter = GetTypeConverter(type);
+				//根据源类型获取指定的转换器
+				var converter = GetTypeConverter(value.GetType());

 				if(converter != null && converter.CanConvertFrom(value.GetType()))
 					return converter.ConvertFrom(value);
+
+				//根据目标类型获取指定的转换器
+				converter = GetTypeConverter(conversionType);
+
+				if(converter != null && converter.CanConvertTo(conversionType))
+					return converter.ConvertTo(value, conversionType);
+
+				//处理字典序列化的情况
+				if(typeof(IDictionary).IsAssignableFrom(value.GetType()) && !typeof(IDictionary).IsAssignableFrom(conversionType))
+					return Zongsoft.Runtime.Serialization.DictionarySerializer.Default.Deserialize((IDictionary)value, conversionType);

 				return System.Convert.ChangeType(value, type);
 			}


Submit HTML form by index

Submit HTML form by index

--- src/Core/HttpQuery.cs
+++ src/Core/HttpQuery.cs
@@ -69,14 +69,32 @@
             });

         public static Query<HttpFetch<HttpContent>> Submit(this Query<HttpFetch<HttpContent>> query, string formSelector, NameValueCollection data) =>
+            Submit(query, formSelector, null, data);
+
+        public static Query<HttpFetch<HttpContent>> Submit(this Query<HttpFetch<HttpContent>> query, int formIndex, NameValueCollection data) =>
+            Submit(query, null, formIndex, data);
+
+        static Query<HttpFetch<HttpContent>> Submit(this Query<HttpFetch<HttpContent>> query, string formSelector, int? formIndex, NameValueCollection data) =>
             from html in query.Html()
-            from fetch in Submit(html.Content, formSelector, data)
+            from fetch in Submit(html.Content, formSelector, formIndex, data)
             select fetch;

-        public static Query<HttpFetch<HttpContent>> Submit(ParsedHtml html, string formSelector, NameValueCollection data)
+        public static Query<HttpFetch<HttpContent>> Submit(ParsedHtml html, string formSelector, NameValueCollection data) =>
+            Submit(html, formSelector, null, data);
+
+        public static Query<HttpFetch<HttpContent>> Submit(ParsedHtml html, int formIndex, NameValueCollection data) =>
+            Submit(html, null, formIndex, data);
+
+        static Query<HttpFetch<HttpContent>> Submit(ParsedHtml html,
+                                                    string formSelector, int? formIndex,
+                                                    NameValueCollection data)
         {
             var forms =
-                from f in html.QueryFormSelectorAll(formSelector)
+                from f in formIndex == null
+                          ? html.QueryFormSelectorAll(formSelector)
+                          : formIndex < html.Forms.Count
+                          ? Enumerable.Repeat(html.Forms[(int) formIndex], 1)
+                          : Enumerable.Empty<HtmlForm>()
                 select new
                 {
                     Action = new Uri(html.TryBaseHref(f.Action), UriKind.Absolute),


Impossible scenario. Cannot have a Die with less than 2 sides.

--- src/DieRoller/Roll.cs
+++ src/DieRoller/Roll.cs
@@ -22,8 +22,6 @@

         public decimal CalculateProbability()
         {
-            if (_die.Sides < 1)
-                return 0;
             var successfulSideCount = _target.GetSuccessCount(_die.Sides);
             var baseProbability = _die.CalculateProbability(successfulSideCount);
             var rerollProbability = _rerollOptions.CalculateProbability(_die, _target);


Don't register CraftingRecipes in CraftingManager constructor

--- Assets/ItemFramework/CraftingManager.cs
+++ Assets/ItemFramework/CraftingManager.cs
@@ -22,10 +22,7 @@
 			}
 		}

-		private CraftingManager()
-		{
-			Register(new RecipeBronzeIngot());
-		}
+		private CraftingManager() {}

 		public void Register(CraftingRecipe recipe)
 		{


Fixed a bug that incorrect letter spacing on mobile platform.

--- Assets/Scripts/Core/Text/DynamicFont.cs
+++ Assets/Scripts/Core/Text/DynamicFont.cs
@@ -21,6 +21,7 @@
 		int _lastFontSize;
 		int _size;
 		FontStyle _style;
+		bool _bold;

 		static CharacterInfo sTempChar;

@@ -117,7 +118,8 @@
 			if (_size == 0)
 				_size = 1;

-			if (format.bold && !customBold)
+			_bold = format.bold;
+			if (_bold && !customBold)
 			{
 				if (format.italic)
 				{
@@ -161,7 +163,7 @@
 				width = Mathf.CeilToInt(sTempChar.width);
 #endif
 				height = ri.height;
-				if (customBold)
+				if (_bold && customBold)
 					width++;

 				if (keepCrisp)
@@ -207,7 +209,7 @@

 				glyph.width = sTempChar.advance;
 				glyph.height = ri.height;
-				if (customBold)
+				if (_bold && customBold)
 					glyph.width++;
 #else
 				glyph.vertMin.x = sTempChar.vert.xMin;
@@ -234,7 +236,7 @@

 				glyph.width = Mathf.CeilToInt(sTempChar.width);
 				glyph.height = sTempChar.size;
-				if (customBold)
+				if (_bold && customBold)
 					glyph.width++;
 #endif
 				if (keepCrisp)


TweenManager now supports TextMeshPro objects

--- Assets/Scripts/Spewnity/TweenManager.cs
+++ Assets/Scripts/Spewnity/TweenManager.cs
@@ -96,7 +96,7 @@
         /// <param name="tweenName">The unique name of the tween</param>
         public void Stop(string tweenName)
         {
-            foreach(List<Tween> list in new List<Tween>[] { activeTweens, tweensToAdd })
+            foreach (List<Tween> list in new List<Tween>[] { activeTweens, tweensToAdd })
             {
                 list.ForEach((t) => { if (t.name == tweenName) Stop(t); });
             }
@@ -247,7 +247,7 @@
         public void ProcessActiveTweens()
         {
             // Process all active tweens
-            foreach(Tween tween in activeTweens)
+            foreach (Tween tween in activeTweens)
             {
                 // Tween loop has run its delay
                 if (tween.delayRemaining > 0)
@@ -308,7 +308,7 @@
         {
             float timeRatio = tween.timeRemaining / tween.duration;

-            foreach(TweenProperty tp in new TweenProperty[] { tween.position, tween.rotation, tween.scale, tween.color, tween.value })
+            foreach (TweenProperty tp in new TweenProperty[] { tween.position, tween.rotation, tween.scale, tween.color, tween.value })
             {
                 if (!tp.enabled) continue;

@@ -380,7 +380,7 @@
         [Tooltip("The duration of the tween in seconds, must be > 0")]
         public float duration;

-        [Tooltip("A GameObject; if you are doing color/alpha tweening, this must contain a SpriteRenderer, Rendererer or Text")]
+        [Tooltip("A GameObject; if you are doing color/alpha tweening, this must contain a SpriteRenderer, Rendererer, Text, TextMesh, or TextMeshPro")]
         public GameObject target;

         [Tooltip("Adjusts the position of the transform")]
@@ -392,7 +392,7 @@
         [Tooltip("Adjusts the scale of the transform; note that 1.0 is default size")]
         public TweenPropertyScale scale;

-        [Tooltip("Adjusts the color of a SpriteRenderer, Renderer, or Text component attached to this GameObject")]
+        [Tooltip("Adjusts the color of a SpriteRenderer, Rendererer, Text, TextMesh, or TextMeshPro component attached to this GameObject")]
         public TweenPropertyColor color;

         [Tooltip("The value of the the tween after it is kicked off, or the last value assigned to the target after the tween finished")]
@@ -416,13 +416,7 @@
         public bool initialized;

         [System.NonSerialized]
-        public SpriteRenderer spriteRenderer;
-
-        [System.NonSerialized]
-        public Renderer renderer;
-
-        [System.NonSerialized]
-        public Text text;
+        public Component component;

         public Tween()
         {
@@ -480,9 +474,15 @@
             }

             // Update caches for non-transform components
-            this.spriteRenderer = target == null ? null : target.GetComponent<SpriteRenderer>();
-            this.renderer = target == null ? null : target.GetComponent<Renderer>();
-            this.text = target == null ? null : target.GetComponent<Text>();
+            this.component = null;
+            if (target != null)
+            {
+                if (component == null) component = target.GetComponent<TextMesh>();
+                if (component == null) component = target.GetComponent<Text>();
+                if (component == null) component = target.GetComponent<SpriteRenderer>();
+                if (component == null) component = target.GetComponent("TMPro.TextMeshPro");
+                if (component == null) component = target.GetComponent<Renderer>();
+            }

             // Activate each property
             position.Activate(this);
@@ -663,21 +663,34 @@
     {
         public override TweenValue? GetTargetValue(Tween tween)
         {
-            if (tween.spriteRenderer != null)
-                return TweenValue.Color(tween.spriteRenderer.color);
-            else if (tween.text != null)
-                return TweenValue.Color(tween.text.color);
-            else if (tween.renderer != null)
-                return TweenValue.Color(tween.renderer.material.color);
-            else throw new UnityException("TweenType.Color requires target to have a SpriteRenderer, Renderer or Text component");
+            if (tween.component is SpriteRenderer)
+                return TweenValue.Color((tween.component as SpriteRenderer).color);
+            else if (tween.component is Text)
+                return TweenValue.Color((tween.component as Text).color);
+            else if (tween.component is Renderer)
+                return TweenValue.Color((tween.component as Renderer).material.color);
+            else if (tween.component is TextMesh)
+                return TweenValue.Color((tween.component as TextMesh).color);
+            else if (tween.component.GetType().ToString() == "TMPro.TextMeshPro") // TextMeshPro may not be installed
+                return TweenValue.Color((Color) tween.component.GetType().GetProperty("color").GetValue(tween.component, null));
+            else throw new UnityException("TweenType.Color requires target to have a SpriteRenderer, Renderer, Text, TextMesh or TextMeshPro component (Found:" +
+                tween.component.GetType().ToString() + ")");
         }

         public override void Apply(Tween tween)
         {
-            if (tween.spriteRenderer != null) tween.spriteRenderer.color = value.Color();
-            else if (tween.text != null) tween.text.color = value.Color();
-            else if (tween.renderer != null) tween.renderer.material.color = value.Color();
-            else Debug.Log("TweenType.Color requires target to have a SpriteRenderer, Renderer or Text component");
+            if (tween.component is SpriteRenderer)
+                ((SpriteRenderer) tween.component).color = value.Color();
+            else if (tween.component is Text)
+                ((Text) tween.component).color = value.Color();
+            else if (tween.component is Renderer)
+                ((Renderer) tween.component).material.color = value.Color();
+            else if (tween.component is TextMesh)
+                ((TextMesh) tween.component).color = value.Color();
+            else if (tween.component.GetType().ToString() == "TMPro.TextMeshPro") // TextMeshPro may not be installed
+                tween.component.GetType().GetProperty("color").SetValue(tween.component, value.Color(), null);
+            else throw new UnityException("TweenType.Color requires target to have a SpriteRenderer, Renderer, Text, TextMesh or TextMeshPro component (Found:" +
+                tween.component.GetType().ToString() + ")");
         }

         public override void AddValueFields(SerializedProperty prop, Rect rect, float width, bool isTweenValue = false)
@@ -911,8 +924,8 @@
         public CompoundTween(CompoundTween ct)
         {
             this.name = ct.name;
-            foreach(CompoundTweenTask task in tasks)
-            this.tasks.Add(task.Clone());
+            foreach (CompoundTweenTask task in tasks)
+                this.tasks.Add(task.Clone());
         }

         public CompoundTween Clone()
@@ -921,17 +934,17 @@
         }
         public void Activate(TweenManager tm)
         {
-            foreach(CompoundTweenTask task in tasks)
-            task.Activate(tm);
+            foreach (CompoundTweenTask task in tasks)
+                task.Activate(tm);
         }

         public bool Apply(TweenManager tm)
         {
             bool complete = true;

-            foreach(CompoundTweenTask task in tasks)
-            if (task.Apply(tm) == false)
-                complete = false;
+            foreach (CompoundTweenTask task in tasks)
+                if (task.Apply(tm) == false)
+                    complete = false;

             return complete;
         }


Introduced DoNavigate

Introduced DoNavigate

git-svn-id: bab0c2de90ee11a20376049c2cdee62584491f34@1348 73e77b4c-caa6-f847-a29a-24ab75ae54b6

--- MonoRail/Castle.MonoRail.Framework/WizardStepPage.cs
+++ MonoRail/Castle.MonoRail.Framework/WizardStepPage.cs
@@ -114,6 +114,38 @@
 		#endregion

 		/// <summary>
+		/// Navigates within the wizard steps.
+		/// </summary>
+		/// <remarks>
+		/// By default this will invoke <see cref="RedirectToNextStep"/>
+		/// however you can send a field form <c>navigate.to</c> to customize this.
+		/// The possible values for <c>navigate.to</c> are:
+		/// <list type="bullet">
+		/// <item><term>previous</term>
+		/// <description>Invokes <see cref="RedirectToPreviousStep"/></description></item>
+		/// <item><term>first</term>
+		/// <description>Invokes <see cref="RedirectToFirstStep"/></description></item>
+		/// </list>
+		/// </remarks>
+		protected void DoNavigate()
+		{
+			String navigateTo = Params["navigate.to"];
+
+			if (navigateTo == "previous")
+			{
+				RedirectToPreviousStep();
+			}
+			else if (navigateTo == "first")
+			{
+				RedirectToFirstStep();
+			}
+			else
+			{
+				RedirectToNextStep();
+			}
+		}
+
+		/// <summary>
 		/// Sends a redirect to the next wizard step (if it exists)
 		/// </summary>
 		/// <exception cref="RailsException">if no further step exists</exception>
@@ -188,9 +220,8 @@
 			// for example in case the url has an Id
 			if( Context.Request.QueryString.HasKeys() )
 			{
-				string url = UrlInfo.CreateAbsoluteRailsUrl( Context.ApplicationPath,
-				                                             _wizardcontroller.Name, prevStep, Context.UrlInfo.Extension )
-					+ Context.Request.Uri.Query;
+				String url = UrlInfo.CreateAbsoluteRailsUrl( Context.ApplicationPath,
+					_wizardcontroller.Name, prevStep, Context.UrlInfo.Extension ) + Context.Request.Uri.Query;

 				Context.Response.Redirect( url );
 			}


Added new return support to Put/Create in MemoryStream.

--- Naos.Database.Domain/Stream/MemoryReadWriteStream.cs
+++ Naos.Database.Domain/Stream/MemoryReadWriteStream.cs
@@ -67,10 +67,13 @@
         public string Id { get; private set; }

         /// <inheritdoc />
-        public override void Execute(
+        public override CreateStreamResult Execute(
             CreateStreamOp operation)
         {
             operation.MustForArg(nameof(operation)).NotBeNull();
+            var alreadyExisted = this.created;
+            var wasCreated = true;
+
             lock (this.streamLock)
             {
                 if (operation == null)
@@ -95,6 +98,7 @@
                             this.locatorToRecordPartitionMap.Clear();
                             break;
                         case ExistingStreamEncounteredStrategy.Skip:
+                            wasCreated = false;
                             break;
                         default:
                             throw new NotSupportedException(
@@ -105,6 +109,9 @@

                 this.created = true;
             }
+
+            var result = new CreateStreamResult(alreadyExisted, wasCreated);
+            return result;
         }

         /// <inheritdoc />
@@ -710,7 +717,7 @@

         /// <inheritdoc />
         [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Justification = NaosSuppressBecause.CA1502_AvoidExcessiveComplexity_DisagreeWithAssessment)]
-        public override long Execute(
+        public override PutRecordResult Execute(
             PutRecordOp operation)
         {
             operation.MustForArg(nameof(operation)).NotBeNull();
@@ -782,14 +789,14 @@
                     case ExistingRecordEncounteredStrategy.DoNotWriteIfFoundById:
                         if (matchesId.Any())
                         {
-                            return -1;
+                            return new PutRecordResult(null, matchesId.First().InternalRecordId);
                         }

                         break;
                     case ExistingRecordEncounteredStrategy.DoNotWriteIfFoundByIdAndType:
                         if (matchesIdAndObject.Any())
                         {
-                            return -1;
+                            return new PutRecordResult(null, matchesIdAndObject.First().InternalRecordId);
                         }

                         break;
@@ -799,7 +806,7 @@

                         if (matchesDoNotWrite.Any())
                         {
-                            return -1;
+                            return new PutRecordResult(null, matchesDoNotWrite.First().InternalRecordId);
                         }

                         break;
@@ -808,7 +815,7 @@
                 var id = Interlocked.Increment(ref this.uniqueLongForInMemoryRecords);
                 var itemToAdd = new StreamRecord(id, operation.Metadata, operation.Payload);
                 recordPartition.Add(itemToAdd);
-                return id;
+                return new PutRecordResult(id, null);
             }
         }


Status is handled by assigning tto ignored unit, remove comment

--- Battery-Commander.Web/Models/Soldier.cs
+++ Battery-Commander.Web/Models/Soldier.cs
@@ -82,8 +82,6 @@

         // public MilitaryEducationLevel EducationLevel { get; set; } = MilitaryEducationLevel.None;

-        // Status - Active, Inactive
-
         [Required]
         public int UnitId { get; set; }


ModuleContainer review on AssemblyResolve

--- BigDataPipeline.Core/ModuleContainer.cs
+++ BigDataPipeline.Core/ModuleContainer.cs
@@ -90,6 +90,7 @@
             if (loadedAssemblies.Count == 0)
             {
                 // register assembly resolution for our loaded modules
+                AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve;
                 AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
             }

@@ -278,20 +279,21 @@
             Assembly a;
             if (!loadedAssemblies.TryGetValue (args.Name, out a))
             {
+                var aName = new AssemblyName (args.Name);
                 if (!args.RequestingAssembly.IsDynamic && !args.RequestingAssembly.GlobalAssemblyCache)
                 {
-                    var path = Path.Combine (Path.GetDirectoryName (args.RequestingAssembly.Location), ParseAssemblyName(args.Name));
+                    var path = Path.Combine (Path.GetDirectoryName (args.RequestingAssembly.Location), aName.Name);
                     if (File.Exists (path + ".dll"))
                         LoadAssembly (new FileInfo (path + ".dll"), null);
                     else if (File.Exists (path + ".exe"))
                         LoadAssembly (new FileInfo (path + ".exe"), null);
                     loadedAssemblies.TryGetValue (args.Name, out a);
                 }
-                if (a == null)
-                {
-                    throw new InvalidOperationException (
-                        String.Format ("Assembly not available in plugin/modules path; assembly name '{0}'.", args.Name));
-                }
+                //if (a == null)
+                //{
+                //    throw new InvalidOperationException (
+                //        String.Format ("Assembly not available in plugin/modules path; assembly name '{0}'.", args.Name));
+                //}
             }
             return a;
         }


Fixed that on running builds already finished builds always fetched test results and so slowing down performance

--- BuildMonitorWpf/Adapter/BuildAdapter.cs
+++ BuildMonitorWpf/Adapter/BuildAdapter.cs
@@ -689,7 +689,7 @@
          }

          var doNotGetTests = !mainWindowViewModel.UseFullWidth && mainWindowViewModel.BigSizeMode;
-         var buildChanged = string.IsNullOrEmpty(PreviousBuildNumber) || !string.Equals(PreviousBuildNumber, firstNotWaiting.Number);
+         var buildChanged = string.IsNullOrEmpty(PreviousBuildNumber) || !string.Equals(PreviousBuildNumber, firstFinished.Number);
          if ((buildChanged || !testsLoaded) && !doNotGetTests)
          {
             await buildExplorer.GetTestResultAsync(BuildInformation, firstNotWaiting);


Corrected issue in function comments

Corrected issue in function comments

--- aaLogReader/aaLgxReader.cs
+++ aaLogReader/aaLgxReader.cs
@@ -26,6 +26,7 @@
         /// EndMsgNumber
         /// Session
         /// PrevFileName
+        /// FQDN
         /// </remarks>
         public static LogHeader ReadLogHeader(string filePath)
         {


Set Applicatoin.targetFrameRate to TARGET_FRAME_RATE const

--- OSVR-Unity/Assets/OSVRUnity/src/DisplayController.cs
+++ OSVR-Unity/Assets/OSVRUnity/src/DisplayController.cs
@@ -37,6 +37,7 @@
         {

             public const uint NUM_VIEWERS = 1;
+            private const int TARGET_FRAME_RATE = 60; //@todo get from OSVR

             private ClientKit _clientKit;
             private OSVR.ClientKit.DisplayConfig _displayConfig;
@@ -97,8 +98,10 @@
                 //VR should never timeout the screen:
                 Screen.sleepTimeout = SleepTimeout.NeverSleep;

-                //60 FPS whenever possible:
-                Application.targetFrameRate = 60;
+                //Set the framerate
+                //@todo get this value from OSVR, not a const value
+                //Performance note: Developers should try setting Time.fixedTimestep to 1/Application.targetFrameRate
+                Application.targetFrameRate = TARGET_FRAME_RATE;
             }

             void SetupDisplay()


Disable the sending of compressed updates when full updates should be sent. This does slow down how quickly prims can be sent over UDP, but it causes the viewer to crash in many cases.

--- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3682,7 +3682,7 @@

                 if (updateFlags.HasFlag (PrimUpdateFlags.FullUpdate))
                 {
-                    //canUseCompressed = false;
+                    canUseCompressed = false;
                     canUseImproved = false;
                 }
                 else if (updateFlags.HasFlag (PrimUpdateFlags.ForcedFullUpdate))


Core - MethodRunnerQueue add additional IsCancellationRequested checks

--- CefSharp/Internals/MethodRunnerQueue.cs
+++ CefSharp/Internals/MethodRunnerQueue.cs
@@ -32,8 +32,18 @@

         public void Enqueue(MethodInvocation methodInvocation)
         {
+            if(cancellationTokenSource.IsCancellationRequested)
+            {
+                return;
+            }
+
             Task.Factory.StartNew(() =>
             {
+                if (cancellationTokenSource.IsCancellationRequested)
+                {
+                    return;
+                }
+
                 var result = ExecuteMethodInvocation(methodInvocation);

                 var handler = MethodInvocationComplete;


Fix FillProportionally Distribution

Fix FillProportionally Distribution

--- TZStackView/StackView.cs
+++ TZStackView/StackView.cs
@@ -549,13 +549,13 @@
                 {
                     var multiplier = subview.IntrinsicContentSize.Width/totalSize;
                     constraints.Add(Constraint(subview, NSLayoutAttribute.Width,
-                        multiplier: (float) multiplier, priority: priority));
+                        multiplier: (float) multiplier, priority: priority, view2: this));
                 }
                 else if (Axis == UILayoutConstraintAxis.Vertical)
                 {
                     var multiplier = subview.IntrinsicContentSize.Height / totalSize;
                     constraints.Add(Constraint(subview, NSLayoutAttribute.Height,
-                        multiplier: (float)multiplier, priority: priority));
+                        multiplier: (float)multiplier, priority: priority, view2: this));
                 }
             }


Fixed a few bugs related to the renderer.

--- PlatformTabbedPage.iOS/PlatformTabbedPageRenderer.cs
+++ PlatformTabbedPage.iOS/PlatformTabbedPageRenderer.cs
@@ -39,7 +39,7 @@

             _defaultTintColor = TabBar.TintColor;
             _defaultUnselectedItemTintColor = TabBar.UnselectedItemTintColor;
-            _defaultBarBackgroundColor = UIColor.Black;
+            _defaultBarBackgroundColor = TabBar.BarTintColor;
             _barStyle = UIBarStyle.Default;
         }

@@ -124,7 +124,7 @@
             }
             else
             {
-                TabBar.BackgroundColor = _defaultBarBackgroundColor;
+                TabBar.BarTintColor = _defaultBarBackgroundColor;
             }
         }


Use FFXIResourceManager.GetAreaName() instead of relying on the special behaviour of FFXIResourceManager.GetResourceString().

--- PlayOnline.FFXI.Utils.StrangeApparatus/MainWindow.cs
+++ PlayOnline.FFXI.Utils.StrangeApparatus/MainWindow.cs
@@ -33,7 +33,7 @@
     private byte[] ElementOffsets = new byte[] { 0, 3, 5, 2, 1, 4, 6, 7 };

     // The area numbers where the strange apparatuses are located.
-    private byte[] AreaIDs = new byte[] { 191, 196, 197, 193, 195, 194, 200, 198 };
+    private ushort[] AreaIDs = new ushort[] { 191, 196, 197, 193, 195, 194, 200, 198 };

     private void btnGenerateCodes_Click(object sender, EventArgs e) {
       this.lvCodes.Items.Clear();
@@ -52,7 +52,7 @@
       }
       Digits[3] = (byte) ((Digits[0] + Digits[1] + Digits[2]) % 100);
       for (byte i = 0; i < 8; ++i) {
-      ListViewItem LVI = this.lvCodes.Items.Add(FFXIResourceManager.GetResourceString(0x00020000U + this.AreaIDs[i]));
+      ListViewItem LVI = this.lvCodes.Items.Add(FFXIResourceManager.GetAreaName(this.AreaIDs[i]));
 	LVI.SubItems.Add(new NamedEnum((Element)      this.ElementOffsets[i]).ToString());
 	LVI.SubItems.Add(new NamedEnum((ElementColor) this.ElementOffsets[i]).ToString());
 	LVI.SubItems.Add(String.Format("{0:00}{1:00}{2:00}{3:00}", Digits[0] + i, Digits[1] + i, Digits[2] + i, (Digits[3] + 4 * i) % 100));


Removes the default announcement sound from Salvage (#7517)

--- Content.Server/Salvage/SalvageSystem.cs
+++ Content.Server/Salvage/SalvageSystem.cs
@@ -293,9 +293,9 @@
             return true;
         }
         private void Report(string messageKey) =>
-            _chatManager.DispatchStationAnnouncement(Loc.GetString(messageKey), Loc.GetString("salvage-system-announcement-source"), colorOverride: Color.Orange);
+            _chatManager.DispatchStationAnnouncement(Loc.GetString(messageKey), Loc.GetString("salvage-system-announcement-source"), colorOverride: Color.Orange, playDefaultSound: false);
         private void Report(string messageKey, params (string, object)[] args) =>
-            _chatManager.DispatchStationAnnouncement(Loc.GetString(messageKey, args), Loc.GetString("salvage-system-announcement-source"), colorOverride: Color.Orange);
+            _chatManager.DispatchStationAnnouncement(Loc.GetString(messageKey, args), Loc.GetString("salvage-system-announcement-source"), colorOverride: Color.Orange, playDefaultSound: false);

         private void Transition(SalvageMagnetComponent magnet, TimeSpan currentTime)
         {


New maps have different max height.

New maps have different max height.

--- Tibialyzer/Structures.cs
+++ Tibialyzer/Structures.cs
@@ -113,7 +113,7 @@
         public int z;

         public const int MaxWidth = 2048;
-        public const int MaxHeight = 2304;
+        public const int MaxHeight = 2048;

         public Coordinate() {
             this.x = MaxWidth / 2;


more cleanup

more cleanup

--- 2016/XmlIntelliSense/XmlIntelliSense.App/MainWindow.xaml.cs
+++ 2016/XmlIntelliSense/XmlIntelliSense.App/MainWindow.xaml.cs
@@ -223,19 +223,14 @@
             //var GetActiveElementStartPath = XmlParser.GetActiveElementStartPath(textEditor.Text, textEditor.TextArea.Caret.Offset);
             //var GetParentElementPath = XmlParser.GetParentElementPath(textEditor.Text);

-            //var xsemmel = XmlParser.GetElementAtCursor(textEditor.Text, textEditor.TextArea.Caret.Offset);
+            //var GetElementAtCursor = XmlParser.GetElementAtCursor(textEditor.Text, textEditor.TextArea.Caret.Offset);

             //StringBuilder builder = new StringBuilder();
             //builder.AppendLine("GetActiveElementStartPath: " + GetActiveElementStartPath.ToString());
             //builder.AppendLine("GetParentElementPath: " + GetParentElementPath.ToString());
-            //builder.AppendLine("xsemmel: " + xsemmel.ToString());
-
-            ////StringBuilder builder = new StringBuilder();
-            ////string s = XParser.GetParentElementAtCursor(textEditor.Text, textEditor.CaretOffset - 1);
-            ////string x = XParser.GetElementAtCursor(textEditor.Text, textEditor.CaretOffset - 1);
-            ////builder.AppendLine(s);
-            ////builder.AppendLine(x);
+            //builder.AppendLine("GetElementAtCursor: " + GetElementAtCursor.ToString());
             //this.CurrentPath.Text = builder.ToString();
+
         }
     }
 }


Using Static and extension methods

Using Static and extension methods

--- TourOfCSharp6/Program.cs
+++ TourOfCSharp6/Program.cs
@@ -1,8 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.Linq.Enumerable;

 namespace TourOfCSharp6
 {
@@ -11,8 +8,26 @@
         static void Main(string[] args)
         {
             var random = new System.Random();
-            var sequence = from n in Enumerable.Range(0, 100)
-                           select new Point { X = random.NextDouble() * 1000, Y = random.NextDouble() * 1000 };
+            var range = Range(1, 100);
+            var sequence = from n in range
+                           select new Point
+                           {
+                               X = random.NextDouble() * 1000,
+                               Y = random.NextDouble() * 1000
+                           };
+
+            var sequence2 = range
+                .Select(n => new Point
+                {
+                    X = random.NextDouble() * 1000,
+                    Y = random.NextDouble() * 1000
+                });
+
+            var sequence3 = Select(range, n => new Point
+            {
+                X = random.NextDouble() * 1000,
+                Y = random.NextDouble() * 1000
+            });

             foreach (var item in sequence)
                 Console.WriteLine(item);


Hiding un-enroll for closed activities

Hiding un-enroll for closed activities

--- AllReadyApp/Web-App/AllReady/Views/Activity/Activity.cshtml
+++ AllReadyApp/Web-App/AllReady/Views/Activity/Activity.cshtml
@@ -145,8 +145,15 @@

Thanks for volunteering!

-
Unenroll

-
There was a problem unenrolling; please try again.

+                            @if (!Model.IsClosed)
+                            {
+
Unenroll

+
There was a problem unenrolling; please try again.

+                            }
+                            else
+                            {
+
This activity is now closed.

+                            }


TypeNotWhitelistedException small changes

--- AngularWebApiSample/src/AngularWebApiSample/Startup.Json.cs
+++ AngularWebApiSample/src/AngularWebApiSample/Startup.Json.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Runtime.Serialization;
 using AngularWebApiSample.Models;
@@ -14,7 +14,6 @@
             : Exception
         {
             public TypeNotWhitelistedException()
-                : base()
             {
             }

@@ -39,7 +38,6 @@
             : Exception
         {
             public TypeNotFoundException()
-                : base()
             {
             }

@@ -100,7 +98,7 @@
                 throw new TypeNotWhitelistedException("Unexpected serialized type");
             }

-            public void BindToName(Type serializedType, out string assemblyName, out string typeName)
+            public void BindToName(Type serializedType, out string? assemblyName, out string? typeName)
             {
                 assemblyName = string.Empty;
                 typeName = serializedType.Name;


more detailed error message

more detailed error message

git-svn-id: 1800f71f313d917366f95485fa960eed04b40598@326 33146b6e-df29-0410-a1ca-39be37fb9416

--- SqlMetal/LoaderFactory.cs
+++ SqlMetal/LoaderFactory.cs
@@ -57,11 +57,24 @@
         /// </summary>
         public ISchemaLoader Load(string connectionString, Type dbLinqSchemaLoaderType, Type databaseConnectionType)
         {
+            if (dbLinqSchemaLoaderType == null)
+                throw new ArgumentNullException("Null dbLinqSchemaLoaderType");
+            if (databaseConnectionType == null)
+                throw new ArgumentNullException("Null databaseConnectionType");
+
+            string errorMsg = "";
             try
             {
+                errorMsg = "Failed on Activator.CreateInstance(" + dbLinqSchemaLoaderType.Name + ")";
                 ISchemaLoader loader = (ISchemaLoader)Activator.CreateInstance(dbLinqSchemaLoaderType);
+
+                errorMsg = "Failed on Activator.CreateInstance(" + databaseConnectionType.Name + ")";
                 IDbConnection connection = (IDbConnection)Activator.CreateInstance(databaseConnectionType);
+
+                errorMsg = "Failed on setting ConnectionString=" + connectionString;
                 connection.ConnectionString = connectionString;
+
+                errorMsg = "";
                 loader.Connection = connection;
                 return loader;
             }
@@ -70,16 +83,25 @@
                 //see Pascal's comment on this failure:
                 //http://groups.google.com/group/dblinq/browse_thread/thread/b7a29138435b0678
                 Console.Error.WriteLine("LoaderFactory.Load(schemaType=" + dbLinqSchemaLoaderType.Name + ", dbConnType=" + databaseConnectionType.Name + ")");
+                if (errorMsg != "")
+                    Console.Error.WriteLine(errorMsg);
                 Console.Error.WriteLine("LoaderFactory.Load() failed: " + ex.Message);
-                //TODO: should we also print the InnerException?
                 throw ex;
             }
         }

-        public ISchemaLoader Load(string connectionString, string dbLinqSchemaLoaderType, string databaseConnectionType)
+        public ISchemaLoader Load(string connectionString, string dbLinqSchemaLoaderTypeName, string databaseConnectionTypeName)
         {
             AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
-            ISchemaLoader loader = Load(connectionString, Type.GetType(dbLinqSchemaLoaderType), Type.GetType(databaseConnectionType));
+            Type dbLinqSchemaLoaderType = Type.GetType(dbLinqSchemaLoaderTypeName);
+            Type databaseConnectionType = Type.GetType(databaseConnectionTypeName);
+
+            if (dbLinqSchemaLoaderType == null)
+                throw new ArgumentException("Unable to resolve dbLinqSchemaLoaderType: " + dbLinqSchemaLoaderTypeName);
+            if (databaseConnectionType == null)
+                throw new ArgumentException("Unable to resolve databaseConnectionType: " + databaseConnectionTypeName);
+
+            ISchemaLoader loader = Load(connectionString, dbLinqSchemaLoaderType, databaseConnectionType);
             AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve;
             return loader;
         }


Fix validation of RUM Key

Fix validation of RUM Key

--- Src/StackifyLib/Config.cs
+++ Src/StackifyLib/Config.cs
@@ -125,7 +125,7 @@
                 }

                 var rumKey = Get("Stackify.Rum_Key");
-                if (Regex.IsMatch(rumKey, "^[A-Za-z0-9-]+$"))
+                if (Regex.IsMatch(rumKey, "^[A-Za-z0-9_-]+$"))
                 {
                     RumKey = rumKey;
                 }