Added more SmtpClient unit tests for progress reporting

--- UnitTests/Net/Smtp/SmtpClientTests.cs
+++ UnitTests/Net/Smtp/SmtpClientTests.cs
@@ -45,6 +45,23 @@
 	[TestFixture]
 	public class SmtpClientTests
 	{
+		class MyProgress : ITransferProgress
+		{
+			public long BytesTransferred;
+			public long TotalSize;
+
+			public void Report (long bytesTransferred, long totalSize)
+			{
+				BytesTransferred = bytesTransferred;
+				TotalSize = totalSize;
+			}
+
+			public void Report (long bytesTransferred)
+			{
+				BytesTransferred = bytesTransferred;
+			}
+		}
+
 		MimeMessage CreateSimpleMessage ()
 		{
 			var message = new MimeMessage ();
@@ -93,7 +110,6 @@
 		{
 			using (var client = new SmtpClient ()) {
 				var credentials = new NetworkCredential ("username", "password");
-				var socket = new Socket (SocketType.Stream, ProtocolType.Tcp);
 				var message = CreateSimpleMessage ();
 				var sender = message.From.Mailboxes.FirstOrDefault ();
 				var recipients = message.To.Mailboxes.ToList ();
@@ -117,7 +133,19 @@
 				Assert.Throws<ArgumentOutOfRangeException> (async () => await client.ConnectAsync ("host", -1, SecureSocketOptions.None));

 				Assert.Throws<ArgumentNullException> (() => client.Connect (null, "host", 25, SecureSocketOptions.None));
-				Assert.Throws<ArgumentException> (() => client.Connect (socket, "host", 25, SecureSocketOptions.None));
+				using (var socket = new Socket (SocketType.Stream, ProtocolType.Tcp))
+					Assert.Throws<ArgumentException> (() => client.Connect (socket, "host", 25, SecureSocketOptions.None));
+
+				using (var socket = Connect ("www.gmail.com", 80)) {
+					Assert.Throws<ArgumentNullException> (() => client.Connect (null, "host", 25, SecureSocketOptions.None));
+					Assert.Throws<ArgumentNullException> (() => client.Connect (socket, null, 25, SecureSocketOptions.None));
+					Assert.Throws<ArgumentException> (() => client.Connect (socket, string.Empty, 25, SecureSocketOptions.None));
+					Assert.Throws<ArgumentOutOfRangeException> (() => client.Connect (socket, "host", -1, SecureSocketOptions.None));
+					Assert.Throws<ArgumentNullException> (async () => await client.ConnectAsync (null, "host", 25, SecureSocketOptions.None));
+					Assert.Throws<ArgumentNullException> (async () => await client.ConnectAsync (socket, null, 25, SecureSocketOptions.None));
+					Assert.Throws<ArgumentException> (async () => await client.ConnectAsync (socket, string.Empty, 25, SecureSocketOptions.None));
+					Assert.Throws<ArgumentOutOfRangeException> (async () => await client.ConnectAsync (socket, "host", -1, SecureSocketOptions.None));
+				}

 				// Authenticate
 				Assert.Throws<ArgumentNullException> (() => client.Authenticate ((SaslMechanism) null));
@@ -212,16 +240,22 @@
 		public void TestSslHandshakeExceptions ()
 		{
 			using (var client = new SmtpClient ()) {
-				Socket socket;
-
 				Assert.Throws<SslHandshakeException> (() => client.Connect ("www.gmail.com", 80, true));
 				Assert.Throws<SslHandshakeException> (async () => await client.ConnectAsync ("www.gmail.com", 80, true));

-				socket = Connect ("www.gmail.com", 80);
-				Assert.Throws<SslHandshakeException> (() => client.Connect (socket, "www.gmail.com", 80, SecureSocketOptions.SslOnConnect));
-
-				socket = Connect ("www.gmail.com", 80);
-				Assert.Throws<SslHandshakeException> (async () => await client.ConnectAsync (socket, "www.gmail.com", 80, SecureSocketOptions.SslOnConnect));
+				using (var socket = Connect ("www.gmail.com", 80))
+					Assert.Throws<SslHandshakeException> (() => client.Connect (socket, "www.gmail.com", 80, SecureSocketOptions.SslOnConnect));
+
+				using (var socket = Connect ("www.gmail.com", 80))
+					Assert.Throws<SslHandshakeException> (async () => await client.ConnectAsync (socket, "www.gmail.com", 80, SecureSocketOptions.SslOnConnect));
+			}
+		}
+
+		[Test]
+		public void TestSyncRoot ()
+		{
+			using (var client = new SmtpClient ()) {
+				Assert.AreEqual (client, client.SyncRoot);
 			}
 		}

@@ -320,6 +354,9 @@
 				Assert.Throws<ServiceNotConnectedException> (() => client.Send (options, message));
 				Assert.Throws<ServiceNotConnectedException> (() => client.Send (message));

+				Assert.Throws<ServiceNotConnectedException> (() => client.Expand ("user@example.com"));
+				Assert.Throws<ServiceNotConnectedException> (() => client.Verify ("user@example.com"));
+
 				try {
 					client.ReplayConnect ("localhost", new SmtpReplayStream (commands, false));
 				} catch (Exception ex) {
@@ -328,6 +365,9 @@

 				Assert.Throws<InvalidOperationException> (() => client.Connect ("host", 465, SecureSocketOptions.SslOnConnect));
 				Assert.Throws<InvalidOperationException> (() => client.Connect ("host", 465, true));
+
+				using (var socket = Connect ("www.gmail.com", 80))
+					Assert.Throws<InvalidOperationException> (() => client.Connect (socket, "host", 465, SecureSocketOptions.SslOnConnect));

 				Assert.Throws<ServiceNotAuthenticatedException> (() => client.Send (options, message, sender, recipients));
 				Assert.Throws<ServiceNotAuthenticatedException> (() => client.Send (message, sender, recipients));
@@ -380,6 +420,9 @@
 				Assert.Throws<ServiceNotConnectedException> (async () => await client.SendAsync (options, message));
 				Assert.Throws<ServiceNotConnectedException> (async () => await client.SendAsync (message));

+				Assert.Throws<ServiceNotConnectedException> (async () => await client.ExpandAsync ("user@example.com"));
+				Assert.Throws<ServiceNotConnectedException> (async () => await client.VerifyAsync ("user@example.com"));
+
 				try {
 					await client.ReplayConnectAsync ("localhost", new SmtpReplayStream (commands, true));
 				} catch (Exception ex) {
@@ -388,6 +431,9 @@

 				Assert.Throws<InvalidOperationException> (async () => await client.ConnectAsync ("host", 465, SecureSocketOptions.SslOnConnect));
 				Assert.Throws<InvalidOperationException> (async () => await client.ConnectAsync ("host", 465, true));
+
+				using (var socket = Connect ("www.gmail.com", 80))
+					Assert.Throws<InvalidOperationException> (async () => await client.ConnectAsync (socket, "host", 465, SecureSocketOptions.SslOnConnect));

 				Assert.Throws<ServiceNotAuthenticatedException> (async () => await client.SendAsync (options, message, sender, recipients));
 				Assert.Throws<ServiceNotAuthenticatedException> (async () => await client.SendAsync (message, sender, recipients));
@@ -420,7 +466,7 @@
 				Assert.IsFalse (client.IsSecure, "Expected IsSecure to be false after disconnecting");

 				var socket = Connect ("smtp.gmail.com", 465);
-				client.Connect (socket, "smtp.gmail.com", 465, SecureSocketOptions.SslOnConnect);
+				client.Connect (socket, "smtp.gmail.com", 465, SecureSocketOptions.Auto);
 				Assert.IsTrue (client.IsConnected, "Expected the client to be connected");
 				Assert.IsTrue (client.IsSecure, "Expected a secure connection");
 				Assert.IsFalse (client.IsAuthenticated, "Expected the client to not be authenticated");
@@ -452,7 +498,7 @@
 				Assert.IsFalse (client.IsSecure, "Expected IsSecure to be false after disconnecting");

 				var socket = Connect ("smtp.gmail.com", 465);
-				await client.ConnectAsync (socket, "smtp.gmail.com", 465, SecureSocketOptions.SslOnConnect);
+				await client.ConnectAsync (socket, "smtp.gmail.com", 465, SecureSocketOptions.Auto);
 				Assert.IsTrue (client.IsConnected, "Expected the client to be connected");
 				Assert.IsTrue (client.IsSecure, "Expected a secure connection");
 				Assert.IsFalse (client.IsAuthenticated, "Expected the client to not be authenticated");
@@ -947,22 +993,30 @@
 			}
 		}

-		[Test]
-		public void TestBinaryMime ()
+		static long Measure (MimeMessage message)
+		{
+			var options = FormatOptions.Default.Clone ();
+
+			options.NewLineFormat = NewLineFormat.Dos;
+
+			using (var measure = new MeasuringStream ()) {
+				message.WriteTo (options, measure);
+				return measure.Length;
+			}
+		}
+
+		[TestCase (false, TestName = "TestBinaryMimeNoProgress")]
+		[TestCase (true, TestName = "TestBinaryMimeWithProgress")]
+		public void TestBinaryMime (bool showProgress)
 		{
 			var message = CreateBinaryMessage ();
+			var size = Measure (message);
 			string bdat;

 			using (var memory = new MemoryStream ()) {
 				var options = FormatOptions.Default.Clone ();
-				long size;

 				options.NewLineFormat = NewLineFormat.Dos;
-
-				using (var measure = new MeasuringStream ()) {
-					message.WriteTo (options, measure);
-					size = measure.Length;
-				}

 				var bytes = Encoding.ASCII.GetBytes (string.Format ("BDAT {0} LAST\r\n", size));
 				memory.Write (bytes, 0, bytes.Length);
@@ -1001,8 +1055,6 @@
 				Assert.AreEqual (36700160, client.MaxSize, "Failed to parse SIZE correctly");
 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.StartTLS), "Failed to detect STARTTLS extension");

-				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.StartTLS), "Failed to detect STARTTLS extension");
-
 				try {
 					client.Authenticate ("username", "password");
 				} catch (Exception ex) {
@@ -1013,7 +1065,15 @@
 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.Chunking), "Failed to detect CHUNKING extension");

 				try {
-					client.Send (message);
+					if (showProgress) {
+						var progress = new MyProgress ();
+
+						client.Send (message, progress: progress);
+
+						Assert.AreEqual (size, progress.BytesTransferred, "BytesTransferred");
+					} else {
+						client.Send (message);
+					}
 				} catch (Exception ex) {
 					Assert.Fail ("Did not expect an exception in Send: {0}", ex);
 				}
@@ -1028,22 +1088,18 @@
 			}
 		}

-		[Test]
-		public async void TestBinaryMimeAsync ()
+		[TestCase (false, TestName = "TestBinaryMimeAsyncNoProgress")]
+		[TestCase (true, TestName = "TestBinaryMimeAsyncWithProgress")]
+		public async void TestBinaryMimeAsync (bool showProgress)
 		{
 			var message = CreateBinaryMessage ();
+			var size = Measure (message);
 			string bdat;

 			using (var memory = new MemoryStream ()) {
 				var options = FormatOptions.Default.Clone ();
-				long size;

 				options.NewLineFormat = NewLineFormat.Dos;
-
-				using (var measure = new MeasuringStream ()) {
-					message.WriteTo (options, measure);
-					size = measure.Length;
-				}

 				var bytes = Encoding.ASCII.GetBytes (string.Format ("BDAT {0} LAST\r\n", size));
 				memory.Write (bytes, 0, bytes.Length);
@@ -1051,7 +1107,7 @@

 				bytes = memory.GetBuffer ();

-				bdat = Encoding.UTF8.GetString (bytes, 0, (int) memory.Length);
+				bdat = Encoding.UTF8.GetString (bytes, 0, (int)memory.Length);
 			}

 			var commands = new List<SmtpReplayCommand> ();
@@ -1082,8 +1138,6 @@
 				Assert.AreEqual (36700160, client.MaxSize, "Failed to parse SIZE correctly");
 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.StartTLS), "Failed to detect STARTTLS extension");

-				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.StartTLS), "Failed to detect STARTTLS extension");
-
 				try {
 					await client.AuthenticateAsync ("username", "password");
 				} catch (Exception ex) {
@@ -1094,7 +1148,15 @@
 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.Chunking), "Failed to detect CHUNKING extension");

 				try {
-					await client.SendAsync (message);
+					if (showProgress) {
+						var progress = new MyProgress ();
+
+						await client.SendAsync (message, progress: progress);
+
+						Assert.AreEqual (size, progress.BytesTransferred, "BytesTransferred");
+					} else {
+						await client.SendAsync (message);
+					}
 				} catch (Exception ex) {
 					Assert.Fail ("Did not expect an exception in Send: {0}", ex);
 				}
@@ -1109,8 +1171,9 @@
 			}
 		}

-		[Test]
-		public void TestPipelining ()
+		[TestCase (false, TestName = "TestPipeliningNoProgress")]
+		[TestCase (true, TestName = "TestPipeliningWithProgress")]
+		public void TestPipelining (bool showProgress)
 		{
 			var commands = new List<SmtpReplayCommand> ();
 			commands.Add (new SmtpReplayCommand ("", "comcast-greeting.txt"));
@@ -1135,12 +1198,9 @@
 				Assert.IsTrue (client.AuthenticationMechanisms.Contains ("PLAIN"), "Failed to detect the PLAIN auth mechanism");

 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.EightBitMime), "Failed to detect 8BITMIME extension");
-
 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.EnhancedStatusCodes), "Failed to detect ENHANCEDSTATUSCODES extension");
-
 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.Size), "Failed to detect SIZE extension");
 				Assert.AreEqual (36700160, client.MaxSize, "Failed to parse SIZE correctly");
-
 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.StartTLS), "Failed to detect STARTTLS extension");

 				try {
@@ -1150,7 +1210,17 @@
 				}

 				try {
-					client.Send (CreateEightBitMessage ());
+					var message = CreateEightBitMessage ();
+
+					if (showProgress) {
+						var progress = new MyProgress ();
+
+						client.Send (message, progress: progress);
+
+						Assert.AreEqual (Measure (message), progress.BytesTransferred, "BytesTransferred");
+					} else {
+						client.Send (message);
+					}
 				} catch (Exception ex) {
 					Assert.Fail ("Did not expect an exception in Send: {0}", ex);
 				}
@@ -1165,8 +1235,9 @@
 			}
 		}

-		[Test]
-		public async void TestPipeliningAsync ()
+		[TestCase (false, TestName = "TestPipeliningAsyncNoProgress")]
+		[TestCase (true, TestName = "TestPipeliningAsyncWithProgress")]
+		public async void TestPipeliningAsync (bool showProgress)
 		{
 			var commands = new List<SmtpReplayCommand> ();
 			commands.Add (new SmtpReplayCommand ("", "comcast-greeting.txt"));
@@ -1191,12 +1262,9 @@
 				Assert.IsTrue (client.AuthenticationMechanisms.Contains ("PLAIN"), "Failed to detect the PLAIN auth mechanism");

 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.EightBitMime), "Failed to detect 8BITMIME extension");
-
 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.EnhancedStatusCodes), "Failed to detect ENHANCEDSTATUSCODES extension");
-
 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.Size), "Failed to detect SIZE extension");
 				Assert.AreEqual (36700160, client.MaxSize, "Failed to parse SIZE correctly");
-
 				Assert.IsTrue (client.Capabilities.HasFlag (SmtpCapabilities.StartTLS), "Failed to detect STARTTLS extension");

 				try {
@@ -1206,7 +1274,17 @@
 				}

 				try {
-					await client.SendAsync (CreateEightBitMessage ());
+					var message = CreateEightBitMessage ();
+
+					if (showProgress) {
+						var progress = new MyProgress ();
+
+						await client.SendAsync (message, progress: progress);
+
+						Assert.AreEqual (Measure (message), progress.BytesTransferred, "BytesTransferred");
+					} else {
+						await client.SendAsync (message);
+					}
 				} catch (Exception ex) {
 					Assert.Fail ("Did not expect an exception in Send: {0}", ex);
 				}


refactor: Simplify ScriptsHttpRequests.GetNextCompletedRequest to more simply iterate through pending requests without unnecessary checks.

--- OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -293,19 +293,13 @@
         {
             lock (HttpListLock)
             {
-                foreach (UUID luid in m_pendingRequests.Keys)
-                {
-                    HttpRequestClass tmpReq;
-
-                    if (m_pendingRequests.TryGetValue(luid, out tmpReq))
-                    {
-                        if (tmpReq.Finished)
-                        {
-                            return tmpReq;
-                        }
-                    }
-                }
-            }
+                foreach (HttpRequestClass req in m_pendingRequests.Values)
+                {
+                    if (req.Finished)
+                        return req;
+                }
+            }
+
             return null;
         }


UrlTitling: Update WikipediaHandler to use new method

--- UrlTitling/WebIrc/WikipediaHandler.cs
+++ UrlTitling/WebIrc/WikipediaHandler.cs
@@ -22,7 +22,7 @@
             if (anchorIndex >= 0 && (anchorIndex + 1) < req.Url.Length)
             {
                 var anchorId = req.Url.Substring(anchorIndex + 1);
-                p = GetFirstParagraph(article, anchorId);
+                p = article.GetFirstParagraph(anchorId);
             }
             // If no anchor or if we couldn't extract a paragraph for the specific anchor,
             // get first paragraph of the article.
@@ -41,24 +41,5 @@
             }
             return req.CreateResult(true);
         }
-
-        // Keep searching, from anchor forward, for a section with paragraphs.
-        // Returns null in case it couldn't find any.
-        static string GetFirstParagraph(WikipediaArticle article, string anchorId)
-        {
-            int sectionIndex = article.IndexOf(anchorId);
-            if (sectionIndex >= 0)
-            {
-                while (sectionIndex < article.SectionCount)
-                {
-                    var section = article[sectionIndex];
-                    if (section.Paragraphs.Length > 0)
-                        return section.Paragraphs[0];
-                    else
-                        sectionIndex++;
-                }
-            }
-            return null;
-        }
     }
 }


Nicer flow in CompressedStringIdentityProvider - though probably up for deletion soon.

--- OpenSonos.LocalMusicServer/Browsing/CompressedStringIdentityProvider.cs
+++ OpenSonos.LocalMusicServer/Browsing/CompressedStringIdentityProvider.cs
@@ -14,18 +14,18 @@

         public SonosIdentifier FromPath(string path)
         {
-            var s = new SonosIdentifier
-            {
-                Id = _identityCompressionStrategy.CompressString(path),
-                Path = path
-            };
+            var id = _identityCompressionStrategy.CompressString(path);

-            if (s.Id.Length > 128)
+            if (id.Length > 128)
             {
                 throw new Exception("Compressed path is too for Sonos systems.");
             }

-            return s;
+            return new SonosIdentifier
+            {
+                Id = id,
+                Path = path
+            };
         }

         public SonosIdentifier FromRequestId(string requestedId)


Исправлен метод SaveWallPhoto. string? –> string.

Тип string нельзя использовать в структуре Nullable<T>, так как ссылочный тип string допускают значение NULL намеренно.

--- VkNet.UWP/Categories/PhotoCategory.cs
+++ VkNet.UWP/Categories/PhotoCategory.cs
@@ -250,7 +250,7 @@
 		/// <remarks>
 		/// Страница документации ВКонтакте <see href="http://vk.com/dev/photos.saveWallPhoto" />.
 		/// </remarks>
-		public ReadOnlyCollection<Photo> SaveWallPhoto(string response, ulong? userId = null, ulong? groupId = null, string? caption = null)
+		public ReadOnlyCollection<Photo> SaveWallPhoto(string response, ulong? userId = null, ulong? groupId = null, string caption = null)
 		{
 			var responseJson = JObject.Parse(response);
 			var server = responseJson["server"].ToString();


data licenses added

data licenses added

--- WWCP_Core/CommonTypes/DataLicenses.cs
+++ WWCP_Core/CommonTypes/DataLicenses.cs
@@ -18,31 +18,58 @@
 namespace org.GraphDefined.WWCP
 {

+    /// <summary>
+    /// The data licenses within the electric vehicle domain.
+    /// </summary>
     public enum DataLicenses
     {

+        /// <summary>
+        /// No license, ask the data source for more details.
+        /// </summary>
         None                                =  0,

+
+
+        // Open Data licenses
+
         /// <summary>
-        /// Open Data Commons Open Database License (ODbL)
+        /// Open Data Commons: Public Domain Dedication and License (PDDL)
+        /// </summary>
+        /// <seealso cref="http://opendatacommons.org/licenses/pddl/"/>
+        PublicDomainDedicationAndLicense    =  1,
+
+        /// <summary>
+        /// Open Data Commons: Attribution License (ODC-By)
+        /// </summary>
+        /// <seealso cref="http://opendatacommons.org/licenses/by/"/>
+        AttributionLicense                  =  2,
+
+        /// <summary>
+        /// Open Data Commons: Open Data Commons Open Database License (ODbL)
         /// Attribution and Share-Alike for Data/Databases
         /// </summary>
         /// <seealso cref="http://opendatacommons.org/licenses/odbl/"/>
         /// <seealso cref="http://opendatacommons.org/licenses/odbl/summary/"/>
         /// <seealso cref="http://opendatacommons.org/licenses/odbl/1.0/"/>
-        OpenDatabaseLicense                 =  1,
+        OpenDatabaseLicense                 =  3,
+
+
+
+
+        // Special German licenses

         /// <summary>
         /// Datenlizenz Deutschland – Namensnennung – Version 2.0
         /// </summary>
         /// <seealso cref="https://www.govdata.de/dl-de/by-2-0"/>
-        DatenlizenzDeutschland_BY_2         =  2,
+        DatenlizenzDeutschland_BY_2         = 10,

         /// <summary>
         /// Datenlizenz Deutschland – Namensnennung – Version 2.0
         /// </summary>
         /// <seealso cref="https://www.govdata.de/dl-de/zero-2-0"/>
-        DatenlizenzDeutschland_Zero_2       =  3,
+        DatenlizenzDeutschland_Zero_2       = 11,

         /// <summary>
         /// GeoLizenz V1.3 – Open
@@ -50,52 +77,54 @@
         /// <seealso cref="https://www.geolizenz.org/index/page.php?p=GL/opendata"/>
         /// <seealso cref="https://www.geolizenz.org/modules/geolizenz/docs/1.3.1/GeoLizenz_V1.3_Open_050615_V1.pdf"/>
         /// <seealso cref="https://www.geolizenz.org/modules/geolizenz/docs/1.3.1/Erl%C3%A4uterungen_GeoLizenzV1.3_Open_06.06.2015_V1.pdf"/>
-        GeoLizenz_OpenData_1_3_1 = 4,
+        GeoLizenz_OpenData_1_3_1            = 12,

+
+        // Creative Commons licenses

         /// <summary>
         /// Creative Commons Attribution 4.0 International (CC BY 4.0)
         /// </summary>
         /// <seealso cref="http://creativecommons.org/licenses/by/4.0/"/>
         /// <seealso cref="http://creativecommons.org/licenses/by/4.0/legalcode"/>
-        CreativeCommons_BY_4                = 10,
+        CreativeCommons_BY_4                = 20,

         /// <summary>
         /// Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
         /// </summary>
         /// <seealso cref="http://creativecommons.org/licenses/by-sa/4.0/"/>
         /// <seealso cref="http://creativecommons.org/licenses/by-sa/4.0/legalcode"/>
-        CreativeCommons_BY_SA_4             = 11,
+        CreativeCommons_BY_SA_4             = 21,

         /// <summary>
         /// Creative Commons Attribution-NoDerivs 4.0 International (CC BY-ND 4.0)
         /// </summary>
         /// <seealso cref="http://creativecommons.org/licenses/by-nd/4.0/"/>
         /// <seealso cref="http://creativecommons.org/licenses/by-nd/4.0/legalcode"/>
-        CreativeCommons_BY_ND_4             = 12,
+        CreativeCommons_BY_ND_4             = 22,

         /// <summary>
         /// Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
         /// </summary>
         /// <seealso cref="http://creativecommons.org/licenses/by-nc/4.0/"/>
         /// <seealso cref="http://creativecommons.org/licenses/by-nc/4.0/legalcode"/>
-        CreativeCommons_BY_NC_4             = 13,
+        CreativeCommons_BY_NC_4             = 23,

         /// <summary>
         /// Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
         /// </summary>
         /// <seealso cref="http://creativecommons.org/licenses/by-nc-sa/4.0/"/>
         /// <seealso cref="http://creativecommons.org/licenses/by-nc-sa/4.0/legalcode"/>
-        CreativeCommons_BY_NC_SA_4          = 14,
+        CreativeCommons_BY_NC_SA_4          = 24,

         /// <summary>
         /// Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International (CC BY-NC-ND 4.0)
         /// </summary>
         /// <seealso cref="http://creativecommons.org/licenses/by-nc-nd/4.0/"/>
         /// <seealso cref="http://creativecommons.org/licenses/by-nc-nd/4.0/legalcode"/>
-        CreativeCommons_BY_NC_ND_4          = 15,
+        CreativeCommons_BY_NC_ND_4          = 25,

     }


Better format args

Better format args

--- WalletWasabi/Hwi/HwiProcessManager.cs
+++ WalletWasabi/Hwi/HwiProcessManager.cs
@@ -35,7 +35,7 @@
 		public static async Task<PSBT> SignTxAsync(HardwareWalletInfo hardwareWalletInfo, PSBT psbt)
 		{
 			var psbtString = psbt.ToString();
-			var networkString = Network == Network.Main ? "" : "--testnet ";
+			var networkString = Network == Network.Main ? "" : " --testnet";
 			JToken jtok = await SendCommandAsync($"{networkString}--device-type \"{hardwareWalletInfo.Type.ToString().ToLowerInvariant()}\" --device-path \"{hardwareWalletInfo.Path}\" signtx {psbtString}");
 			JObject json = jtok as JObject;
 			var signedPsbtString = json.Value<string>("psbt");
@@ -51,8 +51,8 @@
 		/// </summary>
 		public static async Task<ExtPubKey> GetXpubAsync(HardwareWalletInfo hardwareWalletInfo)
 		{
-			var networkString = Network == Network.Main ? "" : "--testnet ";
-			JToken jtok = await SendCommandAsync($"{networkString}--device-type \"{hardwareWalletInfo.Type.ToString().ToLowerInvariant()}\" --device-path \"{hardwareWalletInfo.Path}\" getxpub m/84h/0h/0h");
+			var networkString = Network == Network.Main ? "" : "--testnet";
+			JToken jtok = await SendCommandAsync($"{networkString} --device-type \"{hardwareWalletInfo.Type.ToString().ToLowerInvariant()}\" --device-path \"{hardwareWalletInfo.Path}\" getxpub m/84h/0h/0h");
 			JObject json = jtok as JObject;
 			string xpub = json.Value<string>("xpub");


Make LineGeometryModel3D members protected.

--- Source/HelixToolkit.Wpf.SharpDX/Model/Elements3D/LineGeometryModel3D.cs
+++ Source/HelixToolkit.Wpf.SharpDX/Model/Elements3D/LineGeometryModel3D.cs
@@ -28,19 +28,19 @@

     public class LineGeometryModel3D : GeometryModel3D
     {
-        private InputLayout vertexLayout;
-        private Buffer vertexBuffer;
-        private Buffer indexBuffer;
-        private Buffer instanceBuffer;
-        private EffectTechnique effectTechnique;
-        private EffectTransformVariables effectTransforms;
-        private EffectVectorVariable vViewport, vLineParams; // vFrustum,
+        protected InputLayout vertexLayout;
+        protected Buffer vertexBuffer;
+        protected Buffer indexBuffer;
+        protected Buffer instanceBuffer;
+        protected EffectTechnique effectTechnique;
+        protected EffectTransformVariables effectTransforms;
+        protected EffectVectorVariable vViewport, vLineParams; // vFrustum,
         //private DepthStencilState depthStencilState;
         //private LineGeometry3D geometry;
-        private EffectScalarVariable bHasInstances;
-        private Matrix[] instanceArray;
-        private bool hasInstances = false;
-        private bool isChanged = true;
+        protected EffectScalarVariable bHasInstances;
+        protected Matrix[] instanceArray;
+        protected bool hasInstances = false;
+        protected bool isChanged = true;

         [TypeConverter(typeof(ColorConverter))]
         public Color Color
@@ -204,8 +204,6 @@
             }
         }

-
-
         /// <summary>
         ///
         /// </summary>
@@ -213,10 +211,10 @@
         public override void Attach(IRenderHost host)
         {
             /// --- attach
-            this.renderTechnique = Techniques.RenderLines;
+            renderTechnique = Techniques.RenderLines;
             base.Attach(host);

-            if (this.Geometry == null)
+            if (Geometry == null)
                 return;

 #if DEFERRED
@@ -225,10 +223,10 @@
 #endif

             // --- get device
-            this.vertexLayout = EffectsManager.Instance.GetLayout(this.renderTechnique);
-            this.effectTechnique = effect.GetTechniqueByName(this.renderTechnique.Name);
-
-            this.effectTransforms = new EffectTransformVariables(this.effect);
+            vertexLayout = EffectsManager.Instance.GetLayout(this.renderTechnique);
+            effectTechnique = effect.GetTechniqueByName(this.renderTechnique.Name);
+
+            effectTransforms = new EffectTransformVariables(this.effect);

             // --- get geometry
             var geometry = this.Geometry as LineGeometry3D;
@@ -237,28 +235,28 @@
             if (geometry != null)
             {
                 /// --- set up buffers
-                this.vertexBuffer = Device.CreateBuffer(BindFlags.VertexBuffer, LinesVertex.SizeInBytes, this.CreateLinesVertexArray());
+                vertexBuffer = Device.CreateBuffer(BindFlags.VertexBuffer, LinesVertex.SizeInBytes, CreateLinesVertexArray());

                 /// --- set up indexbuffer
-                this.indexBuffer = Device.CreateBuffer(BindFlags.IndexBuffer, sizeof(int), geometry.Indices.Array);
+                indexBuffer = Device.CreateBuffer(BindFlags.IndexBuffer, sizeof(int), geometry.Indices.Array);
             }

             /// --- init instances buffer
-            this.hasInstances = (this.Instances != null)&&(this.Instances.Any());
-            this.bHasInstances = this.effect.GetVariableByName("bHasInstances").AsScalar();
-            if (this.hasInstances)
-            {
-                this.instanceBuffer = Buffer.Create(this.Device, this.instanceArray, new BufferDescription(Matrix.SizeInBytes * this.instanceArray.Length, ResourceUsage.Dynamic, BindFlags.VertexBuffer, CpuAccessFlags.Write, ResourceOptionFlags.None, 0));
+            hasInstances = (Instances != null)&&(Instances.Any());
+            bHasInstances = effect.GetVariableByName("bHasInstances").AsScalar();
+            if (hasInstances)
+            {
+                instanceBuffer = Buffer.Create(Device, instanceArray, new BufferDescription(Matrix.SizeInBytes * instanceArray.Length, ResourceUsage.Dynamic, BindFlags.VertexBuffer, CpuAccessFlags.Write, ResourceOptionFlags.None, 0));
             }

             /// --- set up const variables
-            this.vViewport = effect.GetVariableByName("vViewport").AsVector();
+            vViewport = effect.GetVariableByName("vViewport").AsVector();
             //this.vFrustum = effect.GetVariableByName("vFrustum").AsVector();
-            this.vLineParams = effect.GetVariableByName("vLineParams").AsVector();
+            vLineParams = effect.GetVariableByName("vLineParams").AsVector();

             /// --- set effect per object const vars
-            var lineParams = new Vector4((float)this.Thickness, (float)this.Smoothness, 0, 0);
-            this.vLineParams.Set(lineParams);
+            var lineParams = new Vector4((float)Thickness, (float)Smoothness, 0, 0);
+            vLineParams.Set(lineParams);

             /// === debug hack
             //{
@@ -268,7 +266,7 @@
             //}

             /// --- create raster state
-            this.OnRasterStateChanged(this.DepthBias);
+            OnRasterStateChanged(DepthBias);

@@ -285,7 +283,7 @@

             /// --- flush
-            this.Device.ImmediateContext.Flush();
+            Device.ImmediateContext.Flush();
         }

         /// <summary>


GSF.Tools: Fixed the StatHistorianReportGenerator for producing Correctness Reports.

--- Source/Tools/StatHistorianReportGenerator/CorrectnessReportGenerator.cs
+++ Source/Tools/StatHistorianReportGenerator/CorrectnessReportGenerator.cs
@@ -1030,8 +1030,12 @@

         private string GetDeviceNameForSignal(string signalReference)
         {
-            return signalReference
-                .Remove(signalReference.LastIndexOf('-'));
+            int index = signalReference.LastIndexOf('-');
+
+            if (index > -1)
+                return signalReference.Remove(index);
+
+            return signalReference;
         }

         private string GetSignalName(string signalReference)


Fix exception when binding model when control has no attribute (e.g. is a label)

--- WebEditor/WebEditor/Models/Element.cs
+++ WebEditor/WebEditor/Models/Element.cs
@@ -263,7 +263,7 @@
                         IEditorDefinition editorDefinition = controller.GetExpressionEditorDefinition(oldTemplateValue, templatesFilter);
                         IEditorData data = controller.GetExpressionEditorData(oldTemplateValue, templatesFilter, null);

-                        foreach (IEditorControl ctl in editorDefinition.Controls)
+                        foreach (IEditorControl ctl in editorDefinition.Controls.Where(c => c.Attribute != null))
                         {
                             string key = attributePrefix + "-" + ctl.Attribute;
                             object value = GetScriptParameterValue(controller, provider, key, ctl.ControlType, ctl.GetString("simpleeditor") ?? "textbox", null, null, ignoreExpression);


Upgrade assembly version to 2.4.0

Upgrade assembly version to 2.4.0

--- WinFormsUI/Properties/AssemblyInfo.cs
+++ WinFormsUI/Properties/AssemblyInfo.cs
@@ -18,8 +18,8 @@

 [assembly: Guid("9d690ef9-ce19-4c69-874c-e24d8eb36aff")]

-[assembly: AssemblyVersion("2.3.1.*")]
-[assembly: AssemblyFileVersion("2.3.1.0")]
+[assembly: AssemblyVersion("2.4.0.*")]
+[assembly: AssemblyFileVersion("2.4.0.0")]

 [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "WeifenLuo.WinFormsUI.Docking", MessageId = "Weifen")]
 [module: SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", Scope = "namespace", Target = "WeifenLuo.WinFormsUI.Docking", MessageId = "Luo")]


Disallow duplicate times

Disallow duplicate times

--- WinRedditWallpaper/MainWindow.xaml.cs
+++ WinRedditWallpaper/MainWindow.xaml.cs
@@ -98,12 +98,11 @@

         public void AddToTriggerTimes(DailyTriggerTime dtt)
         {
-            triggerTimes.Add(dtt);
-            TriggerTimes_LB.Items.Add(dtt);
-            //foreach(DailyTriggerTime t in triggerTimes)
-            //{
-            //    Debug.WriteLine(t);
-            //}
+            if (!triggerTimes.Contains(dtt))
+            {
+                triggerTimes.Add(dtt);
+                TriggerTimes_LB.Items.Add(dtt);
+            }
         }

         private void DeleteTime_Button_Click(object sender, RoutedEventArgs e)
@@ -111,10 +110,6 @@
             //Remove currently selected item:
             triggerTimes.Remove((DailyTriggerTime) TriggerTimes_LB.SelectedItem);
             TriggerTimes_LB.Items.Remove(TriggerTimes_LB.SelectedItem);
-            //foreach (DailyTriggerTime t in triggerTimes)
-            //{
-            //    Debug.WriteLine(t);
-            //}
         }
     }
 }


Update build.cake

Update build.cake

--- XPlat/ExposureNotification/build.cake
+++ XPlat/ExposureNotification/build.cake
@@ -1,10 +1,10 @@
 var TARGET = Argument("t", Argument("target", "ci"));

-var SRC_COMMIT = "1dbccda04f9adb511b422125ebdb2eb3aae8329b";
+var SRC_COMMIT = "0453ef280effd21903f3920fba57b58695cf60ab";
 var SRC_URL = $"https://github.com/xamarin/xamarin.exposurenotification/archive/{SRC_COMMIT}.zip";

 var OUTPUT_PATH = (DirectoryPath)"./output/";
-var NUGET_VERSION = "0.2.0-preview01";
+var NUGET_VERSION = "0.2.1-preview";

 Task("externals")
 	.Does(() =>


Fixed NullReference Exception

Fixed NullReference Exception

--- _Botnuki/Modules/Admin/RolesModule.cs
+++ _Botnuki/Modules/Admin/RolesModule.cs
@@ -32,7 +32,7 @@
                     var ro = GetRole(g, r.ToLower());
                     if (!(AuthorizedRoles.Contains(ro.Name.ToLower())))
                     {
-                        await ReplyAsync($"{ro.Name} is not a role you are allowed to add.");
+                        await ReplyAsync($"The role you tried to add either doesn't exist or is not a role you are authorized for.");
                     }
                     else
                     {
@@ -48,9 +48,11 @@
                 }

             }
-            catch (Exception ex)
-            {
-                await ReplyAsync(ErrorHandling.ThrowGenException("RolesModule.cs", "RoleAdd", ex.Message));
+            catch
+            {
+                await ReplyAsync("The role you have tried to add is not authorized.");
+
+                //await ReplyAsync(ErrorHandling.ThrowGenException("RolesModule.cs", "RoleAdd", ex.Message));
             }
         }

@@ -73,7 +75,7 @@
                     var ro = GetRole(g, r.ToLower());
                     if (!(AuthorizedRoles.Contains(ro.Name.ToLower())))
                     {
-                        await ReplyAsync($"{ro.Name} is not a role you are allowed to add.");
+                        await ReplyAsync($"The role you tried to remove either doesn't exist or is not a role you are authorized for.");
                     }
                     else
                     {
@@ -89,9 +91,10 @@
                 }

             }
-            catch (Exception ex)
-            {
-                await ReplyAsync(ErrorHandling.ThrowGenException("RolesModule.cs", "RoleRemove", ex.Message));
+            catch
+            {
+                await ReplyAsync("The role you have tried to remove is not authorized.");
+                //await ReplyAsync(ErrorHandling.ThrowGenException("RolesModule.cs", "RoleRemove", ex.Message));
             }
         }


endret på administrasjonAvTeam

endret på administrasjonAvTeam

--- kode/SysUt14Gr03/SysUt14Gr03/AdministrasjonAvTeamBrukere.aspx.cs
+++ kode/SysUt14Gr03/SysUt14Gr03/AdministrasjonAvTeamBrukere.aspx.cs
@@ -55,22 +55,24 @@

         protected void bt_fjerneBruker_Click(object sender, EventArgs e)
         {
-
-            foreach(ListItem i in cbl_TeamBrukere.Items) {
-                if(i.Selected){
-                  //  Queries.UpdateBrukerePaaTeam(Queries.GetTeamById(teamId), team_brukerListe[(cbl_TeamBrukere.g - 1)], 2);
-                }
+
+            for (int i = 0; i < cbl_TeamBrukere.Items.Count; i++)
+            {
+                if (cbl_TeamBrukere.Items[i].Selected)
+                {
+                    Queries.UpdateBrukerePaaTeam(Queries.GetTeamById(teamId), team_brukerListe[i], 2);
+                }
             }
             Response.Redirect(Request.RawUrl);
         }

         protected void bt_leggeTilBruker_Click(object sender, EventArgs e)
         {
-            foreach (ListItem i in cbl_brukere.Items)
+            for (int i = 0; i < cbl_TeamBrukere.Items.Count; i++)
             {
-                if (i.Selected)
+                if (cbl_TeamBrukere.Items[i].Selected)
                 {
-                  /*  Queries.UpdateBrukerePaaTeam(Queries.GetTeamById(teamId), Queries.GetBrukerByName(i.Text), 1); */
+                    Queries.UpdateBrukerePaaTeam(Queries.GetTeamById(teamId), team_brukerListe[i], 1);
                 }
             }
             Response.Redirect(Request.RawUrl);


LijstExperiment gebruikte nog niet de globale 'service'.

git-svn-id: 0ffdc289f568b1e7493e560395a00d06174c8a92@119 99b415e2-69d1-4072-8d93-0ed3a15484ab

--- poc/LinqToSql/ConsoleApplication1/Program.cs
+++ poc/LinqToSql/ConsoleApplication1/Program.cs
@@ -156,8 +156,6 @@
         /// </summary>
         static void LijstExperiment()
         {
-            PersonenServiceReference.PersonenServiceClient service = new ConsoleApplication1.PersonenServiceReference.PersonenServiceClient();
-
             var lijst = service.GelieerdePersonenInfoGet(310,1,50); // eerste pagina, paginagrootte = 50

             foreach (vPersoonsInfo i in lijst)
@@ -165,7 +163,6 @@
                 Console.WriteLine(i.VoorNaam + ' ' + i.Naam + ';' + i.Categorieen + ';' + i.StraatNaam + ' ' + i.HuisNr
                     + ';' + i.PostNr + ' ' + i.SubGemeente + ';' + i.TelefoonNummer + ';' + i.EMail);
             }
-            Console.ReadLine();
         }

         static void Main(string[] Arguments)
@@ -175,6 +172,8 @@

             AdressenExperiment();

+            // LijstExperiment();
+
             Console.ReadLine();
         }
     }


Adding necessary condition

Adding necessary condition


Fix C# string.Hash()

Fix C# string.Hash()

--- modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
+++ modules/mono/glue/GodotSharp/GodotSharp/Core/StringExtensions.cs
@@ -462,18 +462,18 @@
         }

         // <summary>
-        // Hash the string and return a 32 bits integer.
-        // </summary>
-        public static int Hash(this string instance)
-        {
-            int index = 0;
-            int hashv = 5381;
-            int c;
-
-            while ((c = instance[index++]) != 0)
-                hashv = (hashv << 5) + hashv + c; // hash * 33 + c
-
-            return hashv;
+        // Hash the string and return a 32 bits unsigned integer.
+        // </summary>
+        public static uint Hash(this string instance)
+        {
+            uint hash = 5381;
+
+            foreach(uint c in instance)
+            {
+                hash = (hash << 5) + hash + c; // hash * 33 + c
+            }
+
+            return hash;
         }

         /// <summary>


fix spreadshot collision bug

fix spreadshot collision bug

--- modules/myModule/scripts/behaviors/combat/powerups/SpreadShot.cs
+++ modules/myModule/scripts/behaviors/combat/powerups/SpreadShot.cs
@@ -97,6 +97,7 @@
    {
       %object.safeDelete();
    }
+   %this.destroy();
 }

 function SpreadShot::destroy(%this)


Fix incorrectly negated conditional

Fix incorrectly negated conditional

--- osu.Framework.Desktop/Input/Handlers/Mouse/OpenTKMouseHandler.cs
+++ osu.Framework.Desktop/Input/Handlers/Mouse/OpenTKMouseHandler.cs
@@ -37,7 +37,7 @@
                 Vector2 pos = new Vector2(point.X, point.Y);

                 // While not focused, let's silently ignore everything but position.
-                if (host.Window.Focused) state = new OpenTK.Input.MouseState();
+                if (!host.Window.Focused) state = new OpenTK.Input.MouseState();

                 PendingStates.Enqueue(new InputState { Mouse = new TkMouseState(state, pos, host.IsActive) });


make circular progress use matrix rather than transform all vertices

--- osu.Framework/Graphics/UserInterface/CircularProgressDrawNode.cs
+++ osu.Framework/Graphics/UserInterface/CircularProgressDrawNode.cs
@@ -11,6 +11,7 @@
 using osu.Framework.Extensions.MatrixExtensions;
 using osu.Framework.Graphics.Rendering;
 using osu.Framework.Graphics.Rendering.Vertices;
+using osu.Framework.Graphics.OpenGL.Buffers;

 namespace osu.Framework.Graphics.UserInterface
 {
@@ -29,6 +30,7 @@

         private Vector2 drawSize;
         private Texture texture;
+        Quad quad;

         public CircularProgressDrawNode(CircularProgress source)
             : base(source)
@@ -43,6 +45,7 @@
             drawSize = Source.DrawSize;
             angle = (float)Source.Current.Value * two_pi;
             innerRadius = Source.InnerRadius;
+            quad = Source.ToLocalSpace(Source.ScreenSpaceDrawQuad);
         }

         private Vector2 pointOnCircle(float angle) => new Vector2(MathF.Sin(angle), -MathF.Cos(angle));
@@ -77,12 +80,11 @@

             Matrix3 transformationMatrix = DrawInfo.Matrix;
             MatrixExtensions.ScaleFromLeft(ref transformationMatrix, drawSize);
+            renderer.PushLocalMatrix(transformationMatrix);

             Vector2 current = origin + pointOnCircle(start_angle) * 0.5f;
             Color4 currentColour = colourAt(current);
-            current = Vector2Extensions.Transform(current, transformationMatrix);

-            Vector2 screenOrigin = Vector2Extensions.Transform(origin, transformationMatrix);
             Color4 originColour = colourAt(origin);

             // Offset by 0.5 pixels inwards to ensure we never sample texels outside the bounds
@@ -93,7 +95,7 @@
             // First center point
             halfCircleBatch.Add(new TexturedVertex2D
             {
-                Position = Vector2.Lerp(current, screenOrigin, innerRadius),
+                Position = Vector2.Lerp(current, origin, innerRadius),
                 TexturePosition = new Vector2(dir >= 0 ? texRect.Left : texRect.Right, texRect.Top),
                 Colour = originColour
             });
@@ -106,28 +108,27 @@
                 Colour = currentColour
             });

-            for (int i = 1; i < amountPoints; i++)
+            for ( int i = 1; i < amountPoints; i++ )
             {
-                float fract = (float)i / (amountPoints - 1);
+                float fract = (float)i / ( amountPoints - 1 );

                 // Clamps the angle so we don't overshoot.
                 // dir is used so negative angles result in negative angularOffset.
                 float angularOffset = Math.Min(fract * two_pi, dir * angle);
                 float normalisedOffset = angularOffset / two_pi;

-                if (dir < 0)
+                if ( dir < 0 )
                     normalisedOffset += 1.0f;

                 // Update `current`
                 current = origin + pointOnCircle(start_angle + angularOffset) * 0.5f;
                 currentColour = colourAt(current);
-                current = Vector2Extensions.Transform(current, transformationMatrix);

                 // current center point
                 halfCircleBatch.Add(new TexturedVertex2D
                 {
-                    Position = Vector2.Lerp(current, screenOrigin, innerRadius),
-                    TexturePosition = new Vector2(texRect.Left + (normalisedOffset + prevOffset) / 2 * texRect.Width, texRect.Top),
+                    Position = Vector2.Lerp(current, origin, innerRadius),
+                    TexturePosition = new Vector2(texRect.Left + ( normalisedOffset + prevOffset ) / 2 * texRect.Width, texRect.Top),
                     Colour = originColour
                 });

@@ -141,6 +142,7 @@

                 prevOffset = normalisedOffset;
             }
+            renderer.PopLocalMatrix();
         }

         public override void Draw(IRenderer renderer)


Fall back to default background

Fall back to default background

--- osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs
+++ osu.Game/Beatmaps/Drawables/UpdateableBeatmapBackgroundSprite.cs
@@ -30,10 +30,15 @@
         {
             return new DelayedLoadUnloadWrapper(() =>
             {
-                if (model?.BeatmapSet?.OnlineInfo == null)
-                    return null;
+                Drawable drawable;

-                Drawable drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType);
+                if (model?.BeatmapSet?.OnlineInfo != null)
+                    drawable = new BeatmapSetCover(model.BeatmapSet, beatmapSetCoverType);
+                else
+                {
+                    // Use the default background if somehow an online set does not exist.
+                    drawable = new BeatmapBackgroundSprite(beatmaps.GetWorkingBeatmap(null));
+                }

                 drawable.RelativeSizeAxes = Axes.Both;
                 drawable.Anchor = Anchor.Centre;


[packages,VSSolutionBuilder] Fixes #299. Removed unused variable, warned by Mono

--- packages/VSSolutionBuilder/bam/Scripts/VSProjectConfiguration.cs
+++ packages/VSSolutionBuilder/bam/Scripts/VSProjectConfiguration.cs
@@ -401,7 +401,6 @@
         AddAssemblyFile(
             C.AssembledObjectFile module)
         {
-            var settings = module.MetaData as VSSettingsGroup;
             var assemblyGroup = this.Project.GetUniqueSettingsGroup(this.Module, VSSettingsGroup.ESettingsGroup.CustomBuild, module.InputPath);
             this.AssemblyFiles.AddUnique(assemblyGroup);
             this.Project.AddAssemblyFile(assemblyGroup);


Allow for configuration of sampling rate in default config.

--- tracecontrol_api/TraceControl.cs
+++ tracecontrol_api/TraceControl.cs
@@ -9,6 +9,11 @@
         private static MethodInfo m_disableMethod;

         public static void EnableDefault()
+        {
+            EnableDefault(TimeSpan.FromMilliseconds(1));
+        }
+
+        public static void EnableDefault(TimeSpan profSampleDelay)
         {
             // Set the output file to be in the current working directory.
             string outputFile = "default.netperf";
@@ -40,6 +45,9 @@

             // Enable the provider.
             config.EnableProvider(providerName, keywords, level);
+
+            // Set the sampling rate.
+            config.SetSamplingRate(profSampleDelay);

             // Enable tracing.
             Enable(config);


Add more unit tests of `ViewDataDictionary` copy constructors

--- test/Microsoft.AspNet.Mvc.Core.Test/ViewDataDictionaryTest.cs
+++ test/Microsoft.AspNet.Mvc.Core.Test/ViewDataDictionaryTest.cs
@@ -157,6 +157,87 @@
             Assert.NotNull(viewData.ModelMetadata);
             Assert.Equal("value1", viewData["key1"]);
             Assert.IsType<CopyOnWriteDictionary<string, object>>(viewData.Data);
+        }
+
+        [Theory]
+        [InlineData(typeof(int))]
+        [InlineData(typeof(string))]
+        [InlineData(typeof(IEnumerable<string>))]
+        [InlineData(typeof(List<string>))]
+        [InlineData(typeof(string[]))]
+        [InlineData(typeof(Dictionary<string, object>))]
+        public void CopyConstructors_CopyModelMetadata(Type type)
+        {
+            // Arrange
+            var metadataProvider = new EmptyModelMetadataProvider();
+            var metadata = metadataProvider.GetMetadataForType(() => null, type);
+            var source = new ViewDataDictionary(metadataProvider)
+            {
+                ModelMetadata = metadata,
+            };
+
+            // Act
+            var viewData1 = new ViewDataDictionary(source);
+            var viewData2 = new ViewDataDictionary(source, model: null);
+
+            // Assert
+            Assert.Same(metadata, viewData1.ModelMetadata);
+            Assert.Same(metadata, viewData2.ModelMetadata);
+        }
+
+        [Fact]
+        public void CopyConstructors_IgnoreModelMetadata_IfForTypeObject()
+        {
+            // Arrange
+            var metadataProvider = new EmptyModelMetadataProvider();
+            var metadata = metadataProvider.GetMetadataForType(() => null, typeof(object));
+            var source = new ViewDataDictionary(metadataProvider)
+            {
+                ModelMetadata = metadata,
+            };
+
+            // Act
+            var viewData1 = new ViewDataDictionary(source);
+            var viewData2 = new ViewDataDictionary(source, model: null);
+
+            // Assert
+            Assert.Null(viewData1.ModelMetadata);
+            Assert.Null(viewData2.ModelMetadata);
+        }
+
+        [Theory]
+        [InlineData(typeof(int), "test string", typeof(string))]
+        [InlineData(typeof(string), 23, typeof(int))]
+        [InlineData(typeof(IEnumerable<string>), new[] { "1", "2", "3", }, typeof(object[]))]
+        [InlineData(typeof(List<string>), new[] { 1, 2, 3, }, typeof(object[]))]
+        public void CopyConstructors_OverrideSourceMetadata_IfModelNonNull(
+            Type sourceType,
+            object instance,
+            Type expectedType)
+        {
+            // Arrange
+            var metadataProvider = new EmptyModelMetadataProvider();
+            var metadata = metadataProvider.GetMetadataForType(() => null, sourceType);
+            var source = new ViewDataDictionary(metadataProvider)
+            {
+                ModelMetadata = metadata,
+            };
+
+            // Act
+            var viewData1 = new ViewDataDictionary(source)
+            {
+                Model = instance,
+            };
+            var viewData2 = new ViewDataDictionary(source, model: instance);
+
+            // Assert
+            Assert.NotNull(viewData1.ModelMetadata);
+            Assert.Equal(expectedType, viewData1.ModelMetadata.ModelType);
+            Assert.Equal(expectedType, viewData1.ModelMetadata.RealModelType);
+
+            Assert.NotNull(viewData2.ModelMetadata);
+            Assert.Equal(expectedType, viewData2.ModelMetadata.ModelType);
+            Assert.Equal(expectedType, viewData2.ModelMetadata.RealModelType);
         }

         public static TheoryData<object, string, object> Eval_EvaluatesExpressionsData


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/WebSocket.cs
+++ websocket-sharp/WebSocket.cs
@@ -3697,19 +3697,19 @@
     }

     /// <summary>
-    /// Sends the data from <paramref name="stream"/> asynchronously using
+    /// Sends the data from the specified stream asynchronously using
     /// the WebSocket connection.
     /// </summary>
     /// <remarks>
-    ///   <para>
-    ///   The data is sent as the binary data.
-    ///   </para>
-    ///   <para>
-    ///   This method does not wait for the send to be complete.
-    ///   </para>
+    /// This method does not wait for the send to be complete.
     /// </remarks>
     /// <param name="stream">
-    /// A <see cref="Stream"/> instance from which to read the data to send.
+    ///   <para>
+    ///   A <see cref="Stream"/> instance from which to read the data to send.
+    ///   </para>
+    ///   <para>
+    ///   The data is sent as the binary data.
+    ///   </para>
     /// </param>
     /// <param name="length">
     /// An <see cref="int"/> that specifies the number of bytes to send.


[Modify] Replace it

[Modify] Replace it

--- websocket-sharp/WebSocket.cs
+++ websocket-sharp/WebSocket.cs
@@ -875,9 +875,7 @@
         _logger.Error (msg);
         _logger.Debug (_context.ToString ());

-        var reason = "A handshake error has occurred.";
-
-        refuseHandshake (CloseStatusCode.ProtocolError, reason);
+        refuseHandshake (1002, "A handshake error has occurred.");

         return false;
       }


Clean up resources in CCLabel-Android (Potential Memory Leak) and log a message if the native drawing fails.

--- src/label_nodes/CCLabel-Android.cs
+++ src/label_nodes/CCLabel-Android.cs
@@ -167,25 +167,38 @@
                 : (CCVerticalTextAlignment.Top == verticleAlignement) ? 0                    // align to top
                 : (imageHeight - boundingRect.Bottom) * 0.5f;                                   // align to center

-            // Create our platform dependant image to be drawn to.
-            var textureBitmap = Bitmap.CreateBitmap(imageWidth, imageHeight, Bitmap.Config.Argb8888);
-
-            var drawingCanvas = new Canvas(textureBitmap);
-            drawingCanvas.DrawARGB(0, 255, 255, 255);
-
-            // Set our vertical alignment
-            drawingCanvas.Translate(0, yOffset);
-
-            // Now draw the text using our layout
-            layout.Draw(drawingCanvas);
-
-            // We will use Texture2D from stream here instead of CCTexture2D stream.
-            var tex = Texture2D.FromStream(CCDrawManager.SharedDrawManager.XnaGraphicsDevice, textureBitmap);
-
-            // Create our texture of the label string.
-            var texture = new CCTexture2D(tex);
-
-            return texture;
+            try {
+                // Create our platform dependant image to be drawn to.
+                using (Bitmap textureBitmap = Bitmap.CreateBitmap(imageWidth, imageHeight, Bitmap.Config.Argb8888))
+                {
+                    using (Canvas drawingCanvas = new Canvas(textureBitmap))
+                    {
+                        drawingCanvas.DrawARGB(0, 255, 255, 255);
+
+                        // Set our vertical alignment
+                        drawingCanvas.Translate(0, yOffset);
+
+                        // Now draw the text using our layout
+                        layout.Draw(drawingCanvas);
+
+                        // We will use Texture2D from stream here instead of CCTexture2D stream.
+                        var tex = Texture2D.FromStream(CCDrawManager.SharedDrawManager.XnaGraphicsDevice, textureBitmap);
+
+                        // Create our texture of the label string.
+                        // Note the use of the third parameter as premultiplied = false
+                        // be careful changing that parameter as it will cause problems with blending
+                        // later on.
+                        var texture = new CCTexture2D(tex, CCSurfaceFormat.Color, false);
+
+                        return texture;
+                    }
+                }
+            }
+            catch (Exception exc)
+            {
+                CCLog.Log ("CCLabel Android: Error creating native label:{0}\n{1}", exc.Message, exc.StackTrace);
+                return new CCTexture2D();
+            }
         }
     }
 }


Corrected method name.

Corrected method name.

--- tests/Magick.NET.Tests/MagickImageTests/TheThresholdMethod.cs
+++ tests/Magick.NET.Tests/MagickImageTests/TheThresholdMethod.cs
@@ -27,7 +27,7 @@
             }

             [Fact]
-            public void ShouldUseThecorrectDefaultValues()
+            public void ShouldUseTheCorrectDefaultValues()
             {
                 using (var image = new MagickImage(Files.ImageMagickJPG))
                 {


Add path type test

Add path type test

--- osu.Game.Rulesets.Osu.Tests/Editor/TestSceneSliderPlacementBlueprint.cs
+++ osu.Game.Rulesets.Osu.Tests/Editor/TestSceneSliderPlacementBlueprint.cs
@@ -290,6 +290,7 @@

             assertPlaced(true);
             assertControlPointCount(3);
+            assertControlPointType(0, PathType.Bezier);
             // Will be > 10000 if not falling back to Bezier path calc.
             assertLength(218.8901f);
         }


Fix float-double conversion

Fix float-double conversion

--- workers/unity/Assets/Gamelogic/Behaviours/OrganismMovement.cs
+++ workers/unity/Assets/Gamelogic/Behaviours/OrganismMovement.cs
@@ -13,8 +13,6 @@
         [Require]
         private Mover.Writer OrganismMoverWriter;

-        int gridBorderX = 990;
-        int gridBorderY = 990;
         int ticksTravelled = 0;
         int maxTicks;
         float tickDelay = Time.deltaTime; //time between Update calls.
@@ -31,7 +29,7 @@
         public void moveOrganism()
         {
             maxTicks = OrganismMoverWriter.Data.timeConstant;
-            if (ticksTravelled / maxTicks > Random.Range(0, 1) * 2)
+            if ((float)ticksTravelled / maxTicks > Random.Range(0, 1) * 2)
             {
                 changeDirection();
                 ticksTravelled = 0;
@@ -46,8 +44,8 @@
             transform.Translate(xTranslation, yTranslation, 0, Space.World);

             Coordinates oldCoordinates = OrganismMoverWriter.Data.position;
-            Coordinates newCoordinates = new Coordinates(Mathf.Clamp(oldCoordinates.X + xTranslation, 0, 1000),
-                                                         Mathf.Clamp(oldCoordinates.Y + yTranslation, 0, 1000),
+            Coordinates newCoordinates = new Coordinates(Mathf.Clamp((float)oldCoordinates.X + xTranslation, 0, 1000),
+                                                         Mathf.Clamp((float)oldCoordinates.Y + yTranslation, 0, 1000),
                                                          oldCoordinates.Z);

             OrganismMoverWriter.Send(new Mover.Update().SetPosition(newCoordinates));
@@ -59,4 +57,4 @@
         }
     }

-}+}


Unified test case names in MessageProcessorTest

Also added `TODO` comments where the test case was
inappropriate (especially the tests in valid cases, where only
non-null was checked, but field contents were not validated).

--- ARGame/Assets/Editor/UnitTests/Network/MessageProcessorTest.cs
+++ ARGame/Assets/Editor/UnitTests/Network/MessageProcessorTest.cs
@@ -29,7 +29,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentNullException))]
-        public void PosUpdateNullTest()
+        public void TestReadUpdatePositionNull()
         {
             MessageProcessor.ReadUpdatePosition(null, 0);
         }
@@ -40,7 +40,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentNullException))]
-        public void RotUpdateNullTest()
+        public void TestReadUpdateRotationNull()
         {
             MessageProcessor.ReadUpdateRotation(null, 0);
         }
@@ -51,7 +51,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentNullException))]
-        public void DelNullTest()
+        public void TestReadDeleteNull()
         {
             MessageProcessor.ReadDelete(null, 0);
         }
@@ -62,7 +62,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentNullException))]
-        public void IntNullTest()
+        public void TestReadIntNull()
         {
             MessageProcessor.ReadInt(null, 0);
         }
@@ -73,7 +73,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentNullException))]
-        public void FloatNullTest()
+        public void TestReadFloatNull()
         {
             MessageProcessor.ReadFloat(null, 0);
         }
@@ -84,7 +84,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void PosUpdateLengthTest()
+        public void TestReadUpdatePositionInvalidLength()
         {
             MessageProcessor.ReadUpdatePosition(new byte[16], 1000);
         }
@@ -95,7 +95,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void RotUpdateLengthTest()
+        public void TestReadUpdateRotationInvalidLength()
         {
             MessageProcessor.ReadUpdateRotation(new byte[16], 1000);
         }
@@ -106,7 +106,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void DeleteLengthTest()
+        public void TestReadDeleteInvalidLength()
         {
             MessageProcessor.ReadDelete(new byte[16], 1000);
         }
@@ -116,7 +116,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void ReadIntNegativeTest()
+        public void TestReadIntNegative()
         {
             MessageProcessor.ReadInt(new byte[16], -1);
         }
@@ -126,7 +126,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void ReadIntOverflowTest()
+        public void TestReadIntOverflow()
         {
             MessageProcessor.ReadInt(new byte[16], 13);
         }
@@ -136,7 +136,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void ReadFloatNegativeTest()
+        public void TestReadFloatNegative()
         {
             MessageProcessor.ReadFloat(new byte[16], -1);
         }
@@ -146,7 +146,7 @@
         /// </summary>
         [Test]
         [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void ReadFloatOverflowTest()
+        public void TestReadFloatOverflow()
         {
             MessageProcessor.ReadFloat(new byte[16], 13);
         }
@@ -156,7 +156,7 @@
         /// is insufficient.
         /// </summary>
         [Test]
-        public void PosUpdateParamTest()
+        public void TestReadUpdatePositionInvalidLength()
         {
             Assert.Null(MessageProcessor.ReadUpdatePosition(new byte[16], 15));
         }
@@ -166,7 +166,7 @@
         /// is insufficient.
         /// </summary>
         [Test]
-        public void RotUpdateParamTest()
+        public void TestReadUpdateRotationInvalidLength()
         {
             Assert.Null(MessageProcessor.ReadUpdateRotation(new byte[16], 7));
         }
@@ -176,7 +176,7 @@
         /// is insufficient.
         /// </summary>
         [Test]
-        public void DeleteParamTest()
+        public void TestReadDeleteInvalidLength()
         {
             Assert.Null(MessageProcessor.ReadDelete(new byte[16], 3));
         }
@@ -186,8 +186,9 @@
         /// is sufficient.
         /// </summary>
         [Test]
-        public void PosUpdateParamTestValid()
-        {
+        public void TestReadUpdatePositionValid()
+        {
+            // TODO: Assert field contents are correct.
             Assert.NotNull(MessageProcessor.ReadUpdatePosition(new byte[16], 16));
         }

@@ -196,8 +197,9 @@
         /// is sufficient.
         /// </summary>
         [Test]
-        public void RotUpdateParamTestValid()
-        {
+        public void TestReadUpdateRotationValid()
+        {
+            // TODO: Assert field contents are correct.
             Assert.NotNull(MessageProcessor.ReadUpdateRotation(new byte[8], 8));
         }

@@ -206,8 +208,9 @@
         /// is sufficient.
         /// </summary>
         [Test]
-        public void DeleteParamTestValid()
-        {
+        public void TestReadDeleteValid()
+        {
+            // TODO: Assert field contents are correct.
             Assert.NotNull(MessageProcessor.ReadDelete(new byte[4], 4));
         }

@@ -216,7 +219,7 @@
         /// cycle.
         /// </summary>
         [Test]
-        public void ReadWriteIntCycles()
+        public void TestReadWriteIntCycles()
         {
             int expected = 77252784;
             byte[] bytes = new byte[4];
@@ -231,7 +234,7 @@
         /// cycle.
         /// </summary>
         [Test]
-        public void ReadWriteFloatTest()
+        public void TestReadWriteFloatCycles()
         {
             float expected = 1.6265f;
             byte[] bytes = new byte[4];


Improved the parsing algorithm

Improved the parsing algorithm

--- AngleSharp/DOM/Css/Properties/Border/CSSBorderWidthProperty.cs
+++ AngleSharp/DOM/Css/Properties/Border/CSSBorderWidthProperty.cs
@@ -80,43 +80,35 @@
                 return true;

             var values = value as CSSValueList ?? new CSSValueList(value);
-            Length? top;
-            Length? bottom;
-            Length? right;
-            Length? left;

-            if (values.Length == 1)
-            {
-                right = left = bottom = top = values[0].ToBorderWidth();
-            }
-            else if (values.Length == 2)
-            {
-                bottom = top = values[0].ToBorderWidth();
-                left = right = values[1].ToBorderWidth();
-            }
-            else if (values.Length == 3)
-            {
-                top = values[0].ToBorderWidth();
-                left = right = values[1].ToBorderWidth();
-                bottom = values[2].ToBorderWidth();
-            }
-            else if (values.Length == 4)
-            {
-                top = values[0].ToBorderWidth();
-                right = values[1].ToBorderWidth();
-                bottom = values[2].ToBorderWidth();
-                left = values[3].ToBorderWidth();
-            }
-            else
+            if (values.Length > 4)
                 return false;

-            if (!top.HasValue || !right.HasValue || !bottom.HasValue || !left.HasValue)
-                return false;
+            var widths = new Length?[4];

-            _top = top.Value;
-            _bottom = bottom.Value;
-            _right = right.Value;
-            _left = left.Value;
+            for (int i = 0; i < values.Length; i++)
+            {
+                var width = values[i].ToBorderWidth();
+
+                if (!width.HasValue)
+                    return false;
+
+                widths[i] = width;
+            }
+
+            if (!widths[1].HasValue)
+                widths[1] = widths[0];
+
+            if (!widths[2].HasValue)
+                widths[2] = widths[0];
+
+            if (!widths[3].HasValue)
+                widths[3] = widths[1];
+
+            _top = widths[0].Value;
+            _right = widths[1].Value;
+            _bottom = widths[2].Value;
+            _left = widths[3].Value;
             return true;
         }


Fix up display name sending.

Fix up display name sending.

--- Aurora/Modules/Avatar/DisplayNamesModule/DisplayNamesModule.cs
+++ Aurora/Modules/Avatar/DisplayNamesModule/DisplayNamesModule.cs
@@ -106,16 +106,23 @@
         public void OnNewClient(IClientAPI client)
         {
             ScenePresence us = ((Scene)client.Scene).GetScenePresence(client.AgentId);
-            IUserProfileInfo info = m_profileConnector.GetUserProfile(client.AgentId);
-            if(info != null)
-                DisplayNameUpdate(info.DisplayName, info.DisplayName, us, client.AgentId);
+            if (us.IsChildAgent)
+                return;
+            IUserProfileInfo usProfile = m_profileConnector.GetUserProfile(client.AgentId);
+            //Send our name to us
+            if (usProfile != null)
+                DisplayNameUpdate(usProfile.DisplayName, usProfile.DisplayName, us, client.AgentId);

             foreach (ScenePresence SP in ((Scene)client.Scene).ScenePresences)
             {
-                info = m_profileConnector.GetUserProfile(SP.UUID);
-                //Send to the incoming user all known display names of avatar's around the client
-                if(info != null)
-                    DisplayNameUpdate(info.DisplayName, info.DisplayName, SP, client.AgentId);
+                if (SP.UUID != client.AgentId)
+                {
+                    IUserProfileInfo info = m_profileConnector.GetUserProfile(SP.UUID);
+                    //Send to the incoming user all known display names of avatar's around the client
+                    if (info != null)
+                        DisplayNameUpdate(info.DisplayName, info.DisplayName, SP, client.AgentId);
+                    DisplayNameUpdate(usProfile.DisplayName, usProfile.DisplayName, us, SP.UUID);
+                }
             }
         }


Refactored a little

Refactored a little

--- Core.ApplicationServices/SystemUsage/GDPR/GDPRExportService.cs
+++ Core.ApplicationServices/SystemUsage/GDPR/GDPRExportService.cs
@@ -24,9 +24,9 @@
         private const int dataHandlerContractTypeId = 5;

         public GDPRExportService(
-            IItSystemUsageRepository systemUsageRepository,
-            IAuthorizationContext authorizationContext,
-            IAttachedOptionRepository attachedOptionRepository,
+            IItSystemUsageRepository systemUsageRepository,
+            IAuthorizationContext authorizationContext,
+            IAttachedOptionRepository attachedOptionRepository,
             ISensitivePersonalDataTypeRepository sensitivePersonalDataTypeRepository)
         {
             _systemUsageRepository = systemUsageRepository;
@@ -48,8 +48,8 @@
             return Result<IEnumerable<GDPRExportReport>, OperationError>.Success(gdpExportReports);
         }

-        private GDPRExportReport Map(ItSystemUsage input,
-            IEnumerable<AttachedOption> attachedOptions,
+        private GDPRExportReport Map(ItSystemUsage input,
+            IEnumerable<AttachedOption> attachedOptions,
             IEnumerable<SensitivePersonalDataType> sensitivePersonalDataTypes)
         {
             return new GDPRExportReport
@@ -70,19 +70,30 @@
                 PersonalData = input.SensitiveDataLevels.Any(x => x.SensitivityDataLevel == SensitiveDataLevel.PERSONALDATA),
                 SensitiveData = input.SensitiveDataLevels.Any(x => x.SensitivityDataLevel == SensitiveDataLevel.SENSITIVEDATA),
                 LegalData = input.SensitiveDataLevels.Any(x => x.SensitivityDataLevel == SensitiveDataLevel.LEGALDATA),
-                LinkToDirectory = ! string.IsNullOrEmpty(input.LinkToDirectoryUrl),
+                LinkToDirectory = !string.IsNullOrEmpty(input.LinkToDirectoryUrl),
                 PreRiskAssessment = input.preriskAssessment,
                 RiskAssessment = input.riskAssessment,
                 SystemName = input.ItSystem.Name,
-                SensitiveDataTypes = input.SensitiveDataLevels.Any(x => x.SensitivityDataLevel == SensitiveDataLevel.SENSITIVEDATA) ?
-                    attachedOptions
-                    .Where(x => x.ObjectType == EntityType.ITSYSTEMUSAGE && x.ObjectId == input.Id && x.OptionType == OptionType.SENSITIVEPERSONALDATA)
-                    .Select(x => x.OptionId)
-                    .Join(sensitivePersonalDataTypes,
-                        optionId => optionId,
-                        sensitivePersonalDataType => sensitivePersonalDataType.Id,
-                        (_, sensitivePersonalDataType) => sensitivePersonalDataType.Name) : new List<string>()
+                SensitiveDataTypes = input.SensitiveDataLevels.Any(x => x.SensitivityDataLevel == SensitiveDataLevel.SENSITIVEDATA)
+                        ? GetSensitiveDataTypes(input.Id, attachedOptions, sensitivePersonalDataTypes)
+                        : new List<string>()
             };
+        }
+
+        private IEnumerable<string> GetSensitiveDataTypes(
+            int usageId,
+            IEnumerable<AttachedOption> attachedOptions,
+            IEnumerable<SensitivePersonalDataType> sensitivePersonalDataTypes)
+        {
+            return attachedOptions
+                .Where(x => x.ObjectType == EntityType.ITSYSTEMUSAGE &&
+                            x.ObjectId == usageId &&
+                            x.OptionType == OptionType.SENSITIVEPERSONALDATA)
+                .Select(x => x.OptionId)
+                .Join(sensitivePersonalDataTypes,
+                    optionId => optionId,
+                    sensitivePersonalDataType => sensitivePersonalDataType.Id,
+                    (_, sensitivePersonalDataType) => sensitivePersonalDataType.Name);
         }
     }
 }


changed footer text of generated pages

changed footer text of generated pages

--- GitHubServices/BusinessLogic/TagPageCreator/MarkDownMutator.cs
+++ GitHubServices/BusinessLogic/TagPageCreator/MarkDownMutator.cs
@@ -78,10 +78,7 @@

         string MutateCommentText(string fileContent, string editUrl)
         {
-            var textBody = string.Format(@"**Comments are very welcome! Corrections and other editorial changes are very welcome. Just go to Github, press the edit button and fire away.
-Have I left out important information about your favourite language, press the edit button. Are there wordings that definitely are not English, press the edit button.
-Do you have something to elaborate.. press the edit button!! :-)**
-
+            var textBody = string.Format(@"**Congratulations! You've come all the way to the bottom of the article! Please help me make this site better for everyone by making editorial changes. Fix spelling mistakes, weird sentences, or correct what is plain wrong. Don't feel shy.** Just go to Github, press the edit button and fire away.

", editUrl);

             var disqusStuff = @"


page will not swipe if caption are shown

--- HiPMobile/HiPMobile.Droid/Activities/ExhibitDetailsActivity.cs
+++ HiPMobile/HiPMobile.Droid/Activities/ExhibitDetailsActivity.cs
@@ -550,6 +550,7 @@
         private void ShowCaptions ()
         {
             // TODO: adapt this to retrieved data
+            isCaptionShown = true;
             var caption = exhibit.Pages [currentPageIndex].Audio.Caption;

             /*** Uncomment this to test the footnote support ***/
@@ -597,7 +598,11 @@
             // add click listener to close button that dismisses the dialog
             var closeBtn = (Button) dialog.FindViewById (Resource.Id.captionDialogCloseButton);
             if (closeBtn != null)
-                closeBtn.Click += (sender, args) => { dialog.Dismiss (); };
+                closeBtn.Click += (sender, args) => {
+                    isCaptionShown = false;
+                    dialog.Dismiss ();
+                    ReactToAudioCompletion(sender, args);
+                };

             dialog.Show ();
         }
@@ -702,6 +707,11 @@
         ///     To store the toolbar state temporarily.
         /// </summary>
         private bool showAudioToolbarFlag = false;
+
+        /// <summary>
+        ///     Used to indicate if the captions are currently displyed
+        /// </summary>
+        private bool isCaptionShown = false;

         /// <summary>
         ///     Handler is needed for UI updates (especially media player - audio progress bar)
@@ -787,7 +797,7 @@
         {
             isAudioPlaying = false;
             UpdatePlayPauseButtonIcon();
-            if (sharedPreferences.GetBoolean (Resources.GetString (Resource.String.pref_auto_page_switch_key), false))
+            if (sharedPreferences.GetBoolean (Resources.GetString (Resource.String.pref_auto_page_switch_key), false) && !isCaptionShown)
                 DisplayNextExhibitPage ();
         }


select arrow now used in Image mode

select arrow now used in Image mode

Former-commit-id: cdda4a4329518050071c279672a1d176e97af03f

--- MeTLMeeting/SandRibbon/Components/CollapsedCanvasStack.xaml.cs
+++ MeTLMeeting/SandRibbon/Components/CollapsedCanvasStack.xaml.cs
@@ -214,6 +214,7 @@
                 case "Insert":
                     MyWork.EditingMode = InkCanvasEditingMode.Select;
                     MyWork.UseCustomCursor = MyWork.EditingMode == InkCanvasEditingMode.Ink;
+                    MyWork.Cursor = Cursors.Arrow;
                     break;
             }
             _focusable = newLayer == "Text";
@@ -383,6 +384,7 @@
             OtherWork.EditingMode = InkCanvasEditingMode.None;
             MyWork.EditingMode = (InkCanvasEditingMode)Enum.Parse(typeof(InkCanvasEditingMode), modeString);
             MyWork.UseCustomCursor = MyWork.EditingMode == InkCanvasEditingMode.Ink;
+
         }
         private Double zoom = 1;
         private void ZoomChanged(Double zoom)


Fix typos and update documentation.

Fix typos and update documentation.

--- Microsoft.TeamFoundation.Authentication/BasicAuthentication.cs
+++ Microsoft.TeamFoundation.Authentication/BasicAuthentication.cs
@@ -9,11 +9,10 @@
     public sealed class BasicAuthentication : BaseAuthentication, IAuthentication
     {
         /// <summary>
-        /// Creats a new <see cref="BasicAuthentication"/> object with a prefix used to interact
-        /// with the underlying credential storage.
+        /// Creates a new <see cref="BasicAuthentication"/> object with an underlying credential store.
         /// </summary>
-        /// <param name="credentialPrefix">
-        /// Value use to parition values stored in the underlying credential storage.
+        /// <param name="credentialStore">
+        /// The <see cref="ICredentialStore"/> to delegate to.
         /// </param>
         public BasicAuthentication(ICredentialStore credentialStore)
         {
@@ -29,7 +28,7 @@
         /// Deletes a <see cref="Credential"/> from the storage used by the authentication object.
         /// </summary>
         /// <param name="targetUri">
-        /// The uniform resource indicator used to uniquely identitfy the credentials.
+        /// The uniform resource indicator used to uniquely identify the credentials.
         /// </param>
         public override void DeleteCredentials(Uri targetUri)
         {
@@ -43,13 +42,13 @@
         /// Gets a <see cref="Credential"/> from the storage used by the authentication object.
         /// </summary>
         /// <param name="targetUri">
-        /// The uniform resource indicator used to uniquely identitfy the credentials.
+        /// The uniform resource indicator used to uniquely identify the credentials.
         /// </param>
         /// <param name="credentials">
         /// If successful a <see cref="Credential"/> object from the authentication object,
-        /// authority or storage; otherwise `null`.
+        /// authority or storage; otherwise <see langword="null"/>.
         /// </param>
-        /// <returns>True if successful; otherwise false.</returns>
+        /// <returns><see langword="true"/> if successful; otherwise <see langword="false"/>.</returns>
         public override bool GetCredentials(Uri targetUri, out Credential credentials)
         {
             BaseSecureStore.ValidateTargetUri(targetUri);
@@ -61,13 +60,13 @@
             return credentials != null;
         }
         /// <summary>
-        /// Sets a <see cref="Credential"/> in the storage used by the authentication object.otr
+        /// Sets a <see cref="Credential"/> in the storage used by the authentication object.
         /// </summary>
         /// <param name="targetUri">
-        /// The uniform resource indicator used to uniquely identitfy the credentials.
+        /// The uniform resource indicator used to uniquely identify the credentials.
         /// </param>
         /// <param name="credentials">The value to be stored.</param>
-        /// <returns>True if successful; otherwise false.</returns>
+        /// <returns><see langword="true"/> if successful; otherwise <see langword="false"/>.</returns>
         public override bool SetCredentials(Uri targetUri, Credential credentials)
         {
             BaseSecureStore.ValidateTargetUri(targetUri);


add tests for Saturday with time

add tests for Saturday with time

--- Mindbox.WorkingCalendar.Tests/CountWorkingDaysInPeriodTests.cs
+++ Mindbox.WorkingCalendar.Tests/CountWorkingDaysInPeriodTests.cs
@@ -244,6 +244,7 @@
 			Assert.AreEqual(expected, workingDays);
 		}

+		[DataRow(13, 0)]
 		[DataRow(14, 0)]
 		[DataRow(15, 1)]
 		[DataRow(16, 2)]
@@ -255,6 +256,27 @@
 		[DataRow(22, 6)]
 		[DataRow(29, 11)]
 		[DataTestMethod]
+		public void CountWorkingDaysInPeriod_FromSaturdayWithTime(int endDay, int expected)
+		{
+			var calendar = new WorkingCalendar(new RussianWorkingDaysExceptionsProvider());
+			var startDateTime = new DateTime(2020, 12, 12, 0, 0, 1);
+			var endDateTime = new DateTime(2020, 12, endDay);
+
+			var workingDays = calendar.CountWorkingDaysInPeriod(startDateTime, endDateTime);
+			Assert.AreEqual(expected, workingDays);
+		}
+
+		[DataRow(14, 0)]
+		[DataRow(15, 1)]
+		[DataRow(16, 2)]
+		[DataRow(17, 3)]
+		[DataRow(18, 4)]
+		[DataRow(19, 5)]
+		[DataRow(20, 5)]
+		[DataRow(21, 5)]
+		[DataRow(22, 6)]
+		[DataRow(29, 11)]
+		[DataTestMethod]
 		public void CountWorkingDaysInPeriod_FromSunday(int endDay, int expected)
 		{
 			var calendar = new WorkingCalendar(new RussianWorkingDaysExceptionsProvider());


Moved single tile rendering to a seperate method to be used by external rendering components

--- Nez.Portable/PipelineRuntime/Tiled/TiledIsometricTiledLayer.cs
+++ Nez.Portable/PipelineRuntime/Tiled/TiledIsometricTiledLayer.cs
@@ -98,67 +98,80 @@
 							continue;
 					}

-					// for the y position, we need to take into account if the tile is larger than the tileHeight and shift. Tiled uses
-					// a bottom-left coordinate system and MonoGame a top-left
-					var tx = tileworldpos.X + position.X;
-					var ty = tileworldpos.Y + position.Y;
-					var rotation = 0f;
-
-					var spriteEffects = SpriteEffects.None;
-					if( tile.flippedHorizonally )
-						spriteEffects |= SpriteEffects.FlipHorizontally;
-					if( tile.flippedVertically )
-						spriteEffects |= SpriteEffects.FlipVertically;
-					if( tile.flippedDiagonally )
-					{
-						if( tile.flippedHorizonally && tile.flippedVertically )
-						{
-							spriteEffects ^= SpriteEffects.FlipVertically;
-							rotation = MathHelper.PiOver2;
-							tx += tiledMap.tileHeight + ( tileRegion.sourceRect.Height - tiledMap.tileHeight );
-							ty -= ( tileRegion.sourceRect.Width - tiledMap.tileWidth );
-						}
-						else if( tile.flippedHorizonally )
-						{
-							spriteEffects ^= SpriteEffects.FlipVertically;
-							rotation = -MathHelper.PiOver2;
-							ty += tiledMap.tileHeight;
-						}
-						else if( tile.flippedVertically )
-						{
-							spriteEffects ^= SpriteEffects.FlipHorizontally;
-							rotation = MathHelper.PiOver2;
-							tx += tiledMap.tileWidth + ( tileRegion.sourceRect.Height - tiledMap.tileHeight );
-							ty += ( tiledMap.tileWidth - tileRegion.sourceRect.Width );
-						}
-						else
-						{
-							spriteEffects ^= SpriteEffects.FlipHorizontally;
-							rotation = -MathHelper.PiOver2;
-							ty += tiledMap.tileHeight;
-						}
-					}
-
-					// if we had no rotations (diagonal flipping) shift our y-coord to account for any non-tileSized tiles to account for
-					// Tiled being bottom-left origin
-					if( rotation == 0 )
-						ty += ( tiledMap.tileHeight - tileRegion.sourceRect.Height );
-
-					batcher.draw( tileRegion.texture2D, new Vector2( tx, ty ), tileRegion.sourceRect, color, rotation, Vector2.Zero, 1, spriteEffects, layerDepth );
-				}
-			}
-		}
-
-
-		#region Tile management
-
-		/// <summary>
-		/// gets the TiledTile at the x/y coordinates. Note that these are tile coordinates not world coordinates!
-		/// </summary>
-		/// <returns>The tile.</returns>
-		/// <param name="x">The x coordinate.</param>
-		/// <param name="y">The y coordinate.</param>
-		public TiledTile getTile( int x, int y )
+                    drawTile( batcher, position, layerDepth, x, y );
+				}
+			}
+		}
+
+
+        public void drawTile(Batcher batcher, Vector2 position, float layerDepth, int x, int y)
+        {
+            var tile = getTile(x, y);
+            if (tile == null)
+                return;
+
+            var tileworldpos = tiledMap.isometricTileToWorldPosition(x, y);
+            var tileRegion = tile.textureRegion;
+
+            // for the y position, we need to take into account if the tile is larger than the tileHeight and shift. Tiled uses
+            // a bottom-left coordinate system and MonoGame a top-left
+            var tx = tileworldpos.X + position.X;
+            var ty = tileworldpos.Y + position.Y;
+            var rotation = 0f;
+
+            var spriteEffects = SpriteEffects.None;
+            if (tile.flippedHorizonally)
+                spriteEffects |= SpriteEffects.FlipHorizontally;
+            if (tile.flippedVertically)
+                spriteEffects |= SpriteEffects.FlipVertically;
+            if (tile.flippedDiagonally)
+            {
+                if (tile.flippedHorizonally && tile.flippedVertically)
+                {
+                    spriteEffects ^= SpriteEffects.FlipVertically;
+                    rotation = MathHelper.PiOver2;
+                    tx += tiledMap.tileHeight + (tileRegion.sourceRect.Height - tiledMap.tileHeight);
+                    ty -= (tileRegion.sourceRect.Width - tiledMap.tileWidth);
+                }
+                else if (tile.flippedHorizonally)
+                {
+                    spriteEffects ^= SpriteEffects.FlipVertically;
+                    rotation = -MathHelper.PiOver2;
+                    ty += tiledMap.tileHeight;
+                }
+                else if (tile.flippedVertically)
+                {
+                    spriteEffects ^= SpriteEffects.FlipHorizontally;
+                    rotation = MathHelper.PiOver2;
+                    tx += tiledMap.tileWidth + (tileRegion.sourceRect.Height - tiledMap.tileHeight);
+                    ty += (tiledMap.tileWidth - tileRegion.sourceRect.Width);
+                }
+                else
+                {
+                    spriteEffects ^= SpriteEffects.FlipHorizontally;
+                    rotation = -MathHelper.PiOver2;
+                    ty += tiledMap.tileHeight;
+                }
+            }
+
+            // if we had no rotations (diagonal flipping) shift our y-coord to account for any non-tileSized tiles to account for
+            // Tiled being bottom-left origin
+            if (rotation == 0)
+                ty += (tiledMap.tileHeight - tileRegion.sourceRect.Height);
+
+            batcher.draw(tileRegion.texture2D, new Vector2(tx, ty), tileRegion.sourceRect, color, rotation, Vector2.Zero, 1, spriteEffects, layerDepth);
+        }
+
+
+        #region Tile management
+
+        /// <summary>
+        /// gets the TiledTile at the x/y coordinates. Note that these are tile coordinates not world coordinates!
+        /// </summary>
+        /// <returns>The tile.</returns>
+        /// <param name="x">The x coordinate.</param>
+        /// <param name="y">The y coordinate.</param>
+        public TiledTile getTile( int x, int y )
 		{
 			return tiles[x + y * width];
 		}


fixed Inventory Serializer

fixed Inventory Serializer

--- OctoAwesome/OctoAwesome/EntityComponents/InventoryComponent.cs
+++ OctoAwesome/OctoAwesome/EntityComponents/InventoryComponent.cs
@@ -26,10 +26,12 @@
             var count = reader.ReadInt32();
             for (int i = 0; i < count; i++)
             {
-                var id = reader.ReadUInt16();
+                string name = reader.ReadString();
+                var definition = definitionManager.GetDefinitions().FirstOrDefault(d => d.GetType().FullName == name);
                 var amount = reader.ReadDecimal();

-                var definition = definitionManager.GetBlockDefinitionByIndex(id);
+                if (definition == null)
+                    continue;

                 var slot = new InventorySlot()
                 {
@@ -48,12 +50,9 @@
             writer.Write(Inventory.Count);
             foreach (var slot in Inventory)
             {
-                var id = definitionManager.GetBlockDefinitionIndex((IBlockDefinition)slot.Definition);
-                writer.Write(id);
+                writer.Write(slot.Definition.GetType().FullName);
                 writer.Write(slot.Amount);
             }
-
-
         }
     }
 }


PL translation of ``Conflicting Packages Dialog``

--- RelhaxModpack/RelhaxModpack/Translations/TranslationsPolish.cs
+++ RelhaxModpack/RelhaxModpack/Translations/TranslationsPolish.cs
@@ -670,32 +670,39 @@
             #region Conflicting Packages Dialog
             //Component: ConflictingPackageDialog
             //Application window title
-            Polish.Add("ConflictingPackageDialog", TranslationNeeded);
+            Polish.Add("ConflictingPackageDialog", "Konflikt Modów");
+
+            //Component: conflictingPackageMessageOptionA
+            //
+            Polish.Add("conflictingPackageMessageOptionA", "Opcja A");
+
+            //Component: conflictingPackageMessageOptionB
+            //
+            Polish.Add("conflictingPackageMessageOptionB", "Opcja B");

             //Component: conflictingPackageMessagePartA
             //
-            Polish.Add("conflictingPackageMessagePartA", TranslationNeeded);
+            Polish.Add("conflictingPackageMessagePartA", "Wybrano pakiet \"{0}\", który konfliktuje z innymi opcjami, które wybrano:");

             //Component: conflictingPackagePackageOfCategory
             //
-            Polish.Add("conflictingPackagePackageOfCategory", TranslationNeeded);
+            Polish.Add("conflictingPackagePackageOfCategory", "- {0} w kategorii {1}");

             //Component: conflictingPackageMessagePartB
             //
-            Polish.Add("conflictingPackageMessagePartB", TranslationNeeded);
+            Polish.Add("conflictingPackageMessagePartB", Polish["conflictingPackageMessageOptionA"] + ": Wybierz \"{0}\" i pomiń konfliktujące z tym pakiety");

             //Component: conflictingPackageMessagePartC
             //
-            Polish.Add("conflictingPackageMessagePartC", TranslationNeeded);
+            Polish.Add("conflictingPackageMessagePartC", Polish["conflictingPackageMessageOptionB"] + ": Zostaw konfliktujące pakiety, ale pomiń \"{0}\"");

             //Component: conflictingPackageMessagePartD
             //
-            Polish.Add("conflictingPackageMessagePartD", TranslationNeeded);
+            Polish.Add("conflictingPackageMessagePartD", "Zamknięcie tego okna spowoduje automatyczny wybór Opcji B");

             //Component: conflictingPackageMessagePartE
             //
-            Polish.Add("conflictingPackageMessagePartE", TranslationNeeded);
-            #endregion
+            English.Add("conflictingPackageMessagePartE", "Którą opcję wybierasz?");
+            #endregion        }
         }
     }
-}


added arrows

added arrows

--- Second_semestr/Homework_6/ClockWinForms/ClockWinForms/Form1.cs
+++ Second_semestr/Homework_6/ClockWinForms/ClockWinForms/Form1.cs
@@ -17,19 +17,38 @@

             Timer time = new Timer();
-            time.Interval = 500;
+            time.Interval = 100;
             time.Tick += Arrow;
             time.Enabled = true;
+
+            Timer time2 = new Timer();
+            time2.Interval = 10000;
+            time2.Tick += Arrow2;
+            time2.Enabled = true;
+
+            Timer time3 = new Timer();
+            time3.Interval = 800;
+            time3.Tick += Arrow3;
+            time3.Enabled = true;
         }

-        Pen MyPen = new Pen(Color.Red, 5);
-        float x2 = 175;
-        float y2 = 50;
+        Pen MyPen = new Pen(Color.DarkSeaGreen, 5);
+        float x2 = 200;
+        float y2 = 20;
         int fi = -90;
-        int r = 125;
+        int r = 175;

-
+        Pen MyPen2 = new Pen(Color.Pink, 10);
+        float x22 = 200;
+        float y22 = 100;
+        int fi2 = -90;
+        int r2 = 100;

+        Pen MyPen3 = new Pen(Color.DarkOrchid, 2);
+        float x23 = 200;
+        float y23 = 100;
+        int fi3 = -90;
+        int r3 = 150;

         ////////public SomeForm()
         ////////{
@@ -76,22 +95,38 @@
             ////e.Graphics.DrawImageUnscaled(drawing, 0, 0);
             ////g.Dispose();

-            ////time.Interval = 500;
-            ////time.Tick += Arrow;
-            ////time.Enabled = true;
-

             e.Graphics.DrawEllipse(MyPen, 10, 10, 380, 380);
             e.Graphics.DrawLine(MyPen, 200, 200, x2, y2);
-
-
-
-
-
+            e.Graphics.DrawLine(MyPen2, 200, 200, x22, y22);
+            e.Graphics.DrawLine(MyPen3, 200, 200, x23, y23);
         }

+        private void Arrow2(object sender, EventArgs e)
+        {

+            ClockFace.Invalidate();
+            fi2 += 30;
+            float cosFi = (float)Math.Cos(((Math.PI * fi2) / 180));
+            float sinFi = (float)Math.Sin(((Math.PI * fi2) / 180));
+
+            x22 = 200 + r2 * cosFi;
+            y22 = 200 + r2 * sinFi;
+        }
+
+        private void Arrow3(object sender, EventArgs e)
+        {
+
+            ClockFace.Invalidate();
+            fi3 += 60;
+            float cosFi = (float)Math.Cos(((Math.PI * fi3) / 180));
+            float sinFi = (float)Math.Sin(((Math.PI * fi3) / 180));
+
+            x23 = 200 + r3 * cosFi;
+            y23 = 200 + r3 * sinFi;
+
+        }

         private void Arrow(object sender, EventArgs e)
         {
@@ -105,16 +140,5 @@
             y2 = 200 + r * sinFi;

         }
-
-        private void Movement(object sender, EventArgs e)
-        {
-
-            fi += 6;
-            float cosFi = (float)Math.Cos(((Math.PI * fi) / 180));
-            float sinFi = (float)Math.Sin(((Math.PI * fi) / 180));
-
-            x2 = 200 + r * cosFi;
-            y2 = 200 + r * sinFi;
-        }
     }
 }


more filter properties for appointments request

--- SnapMD.VirtualCare.ApiModels/Scheduling/AppointmentsRequest.cs
+++ SnapMD.VirtualCare.ApiModels/Scheduling/AppointmentsRequest.cs
@@ -9,11 +9,35 @@
     public class AppointmentsRequest : AvailabilityBlocksRequest
     {
         /// <summary>
-        /// Gets or sets the appointment status codes.
+        /// The appointment type codes to be searched.
+        /// </summary>
+        /// <value>
+        /// The appointment type codes.
+        /// </value>
+        public AppointmentTypeCode[] AppointmentTypeCodes { get; set; }
+
+        /// <summary>
+        /// The appointment status codes to be searched.
         /// </summary>
         /// <value>
         /// The appointment status codes.
         /// </value>
         public AppointmentStatusCode[] AppointmentStatusCodes { get; set; }
+
+        /// <summary>
+        /// The patient user identifier.  Filters patient appointments.
+        /// </summary>
+        /// <value>
+        /// The patient user identifier.
+        /// </value>
+        public int? PatientUserId { get; set; }
+
+        /// <summary>
+        /// Flag indicates search should include patient dependents or not.
+        /// </summary>
+        /// <value>
+        /// The include patient dependents.
+        /// </value>
+        public bool? IncludePatientDependents { get; set; }
     }
 }


Improve #24 Check latest version in Unity Settings panel

--- Soomla/Assets/Plugins/Soomla/Core/Config/SoomlaEditorScript.cs
+++ Soomla/Assets/Plugins/Soomla/Core/Config/SoomlaEditorScript.cs
@@ -148,6 +148,7 @@

 		public static JSONObject versionJson;
 		public static WWW www;
+		public static string status;

 		public static void GetVerstion(){
 			www = new WWW ("http://library.soom.la/fetch/info");
@@ -155,31 +156,39 @@

 		public static void LatestVersionField(string ident, string version)
 		{
+			string latestVersion = "";
 			if (versionJson == null) {
-				if(www.isDone) {
+				status = "Cheking version";
+				if (www.isDone) {
 					versionJson = new JSONObject (www.text);
 				}
 			} else {
-				string latestVersion = versionJson.GetField (ident).GetField ("latest").str;
+				latestVersion = versionJson.GetField (ident).GetField ("latest").str;
+			}
+			GUIStyle style = new GUIStyle (GUI.skin.label);
+			if (version != latestVersion) {
+				status = "New Core version available!";
+				style.normal.textColor = Color.blue;
+			} else {
+				status = "";
+			}
+			EditorGUILayout.BeginHorizontal ();
+			if (GUILayout.Button (status, style, GUILayout.Width (170), FieldHeight)) {
 				if (version != latestVersion) {
-					EditorGUILayout.BeginHorizontal ();
-					EditorGUILayout.LabelField ("New version: ", GUILayout.Width (80), FieldHeight);
-					GUIStyle style = new GUIStyle (GUI.skin.label);
-					style.normal.textColor = Color.blue;
-					if (GUILayout.Button ("Download " + latestVersion, style, GUILayout.Width (110), FieldHeight)) {
+					if(latestVersion != ""){
 						if (ident == "unity3d-core") {
-							Application.OpenURL ("https://github.com/soomla/soomla-unity3d-core");
+							Application.OpenURL ("http://library.soom.la/fetch/unity3d-core/latest?cf=unity");
 						} else if (ident == "unity3d-store") {
-							Application.OpenURL ("https://github.com/soomla/unity3d-store");
+							Application.OpenURL ("http://library.soom.la/fetch/unity3d-store/latest?cf=unity");
 						} else if (ident == "unity3d-profile") {
-							Application.OpenURL ("https://github.com/soomla/unity3d-profile");
+							Application.OpenURL ("http://library.soom.la/fetch/unity3d-profile/latest?cf=unity");
 						} else if (ident == "unity3d-levelup") {
-							Application.OpenURL ("https://github.com/soomla/unity3d-levelup");
+							Application.OpenURL ("http://library.soom.la/fetch/unity3d-levelup/latest?cf=unity");
 						}
-					}
-					EditorGUILayout.EndHorizontal ();
+					}
 				}
-			}
+			}
+			EditorGUILayout.EndHorizontal ();
 		}

 		public static void SelectableLabelField(GUIContent label, string value)