Added socket option constants and structures, IN_ADDR standard values, SOCKADDR constructors for IPAddress and IPEndPoint

--- PInvoke/Ws2_32/WinSock2.cs
+++ PInvoke/Ws2_32/WinSock2.cs
@@ -1,8 +1,8 @@
 #pragma warning disable IDE1006 // Naming Styles

 using System;
+using System.Net;
 using System.Runtime.InteropServices;
-using System.Text;
 using Vanara.Extensions;
 using Vanara.InteropServices;

@@ -11,11 +11,189 @@
 	/// Functions, structures and constants from ws2_32.h.
 	public static partial class Ws2_32
 	{
+		///
+		/// An opaque data structure object from the service provider associated with socket s. This object stores the current configuration
+		/// information of the service provider. The exact format of this data structure is service provider specific.
+		///
+		public const int PVD_CONFIG = 0x3001;
+
+		/// The socket is listening.
+		[CorrespondingType(typeof(BOOL))]
+		public const int SO_ACCEPTCONN = 0x0002;
+
+		/// The socket is configured for the transmission and receipt of broadcast messages.
+		[CorrespondingType(typeof(BOOL))]
+		public const int SO_BROADCAST = 0x0020;
+
+		/// Returns the local address, local port, remote address, remote port, socket type, and protocol used by a socket.
+		[CorrespondingType(typeof(CSADDR_INFO))]
+		public const int SO_BSP_STATE = 0x1009;
+
+		/// Returns current socket state, either from a previous call to setsockopt or the system default.
+		[CorrespondingType(typeof(BOOL))]
+		public const int SO_CONDITIONAL_ACCEPT = 0x3002;
+
+		///
+		public const int SO_CONNDATA = 0x7000;
+
+		///
+		public const int SO_CONNDATALEN = 0x7004;
+
+		///
+		/// Returns the number of seconds a socket has been connected. This socket option is valid for connection oriented protocols only.
+		///
+		[CorrespondingType(typeof(uint))]
+		public const int SO_CONNECT_TIME = 0x700C;
+
+		///
+		public const int SO_CONNOPT = 0x7001;
+
+		///
+		public const int SO_CONNOPTLEN = 0x7005;
+
+		/// Debugging is enabled.
+		[CorrespondingType(typeof(BOOL))]
+		public const int SO_DEBUG = 0x0001;
+
+		///
+		public const int SO_DISCDATA = 0x7002;
+
+		///
+		public const int SO_DISCDATALEN = 0x7006;
+
+		///
+		public const int SO_DISCOPT = 0x7003;
+
+		///
+		public const int SO_DISCOPTLEN = 0x7007;
+
+		/// If TRUE, the SO_LINGER option is disabled.
+		[CorrespondingType(typeof(BOOL))]
+		public const int SO_DONTLINGER = (int)(~SO_LINGER);
+
+		///
+		/// Routing is disabled. Setting this succeeds but is ignored on AF_INET sockets; fails on AF_INET6 sockets with WSAENOPROTOOPT.
+		/// This option is not supported on ATM sockets.
+		///
+		[CorrespondingType(typeof(BOOL))]
+		public const int SO_DONTROUTE = 0x0010;
+
+		/// Retrieves error status and clear.
+		[CorrespondingType(typeof(int))]
+		public const int SO_ERROR = 0x1007;
+
+		///
+		/// Prevents any other socket from binding to the same address and port. This option must be set before calling the bind function.
+		///
+		[CorrespondingType(typeof(BOOL))]
+		public const int SO_EXCLUSIVEADDRUSE = ((int)(~SO_REUSEADDR));
+
+		/// Reserved.
+		[CorrespondingType(typeof(GROUP))]
+		public const int SO_GROUP_ID = 0x2001;
+
+		/// Reserved.
+		[CorrespondingType(typeof(int))]
+		public const int SO_GROUP_PRIORITY = 0x2002;
+
+		/// Keep-alives are being sent. Not supported on ATM sockets.
+		[CorrespondingType(typeof(BOOL))]
+		public const int SO_KEEPALIVE = 0x0008;
+
+		/// Returns the current linger options.
+		[CorrespondingType(typeof(LINGER))]
+		public const int SO_LINGER = 0x0080;
+
+		///
+		/// The maximum size of a message for message-oriented socket types (for example, SOCK_DGRAM). Has no meaning for stream oriented sockets.
+		///
+		[CorrespondingType(typeof(uint))]
+		public const int SO_MAX_MSG_SIZE = 0x2003;
+
+		///
+		public const int SO_MAXDG = 0x7009;
+
+		///
+		public const int SO_MAXPATHDG = 0x700A;
+
+		///
+		/// OOB data is being received in the normal data stream. (See section Windows Sockets 1.1 Blocking Routines and EINPROGRESS for a
+		/// discussion of this topic.)
+		///
+		[CorrespondingType(typeof(BOOL))]
+		public const int SO_OOBINLINE = 0x0100;
+
+		/// A description of the protocol information for the protocol that is bound to this socket.
+		[CorrespondingType(typeof(WSAPROTOCOL_INFO))]
+		public const int SO_PROTOCOL_INFO = SO_PROTOCOL_INFOW;
+
+		/// A description of the protocol information for the protocol that is bound to this socket.
+		[CorrespondingType(typeof(WSAPROTOCOL_INFO))]
+		public const int SO_PROTOCOL_INFOA = 0x2004;
+
+		/// A description of the protocol information for the protocol that is bound to this socket.
+		[CorrespondingType(typeof(WSAPROTOCOL_INFO))]
+		public const int SO_PROTOCOL_INFOW = 0x2005;
+
+		///
+		/// The total per-socket buffer space reserved for receives. This is unrelated to SO_MAX_MSG_SIZE and does not necessarily
+		/// correspond to the size of the TCP receive window.
+		///
+		[CorrespondingType(typeof(int))]
+		public const int SO_RCVBUF = 0x1002;
+
+		/// Receives low watermark.
+		[CorrespondingType(typeof(int))]
+		public const int SO_RCVLOWAT = 0x1004;
+
+		/// Receives time-out.
+		[CorrespondingType(typeof(int))]
+		public const int SO_RCVTIMEO = 0x1006;
+
+		/// The socket can be bound to an address which is already in use. Not applicable for ATM sockets.
+		[CorrespondingType(typeof(BOOL))]
+		public const int SO_REUSEADDR = 0x0004;
+
+		///
+		/// The total per-socket buffer space reserved for sends. This is unrelated to SO_MAX_MSG_SIZE and does not necessarily correspond
+		/// to the size of a TCP send window.
+		///
+		[CorrespondingType(typeof(int))]
+		public const int SO_SNDBUF = 0x1001;
+
+		/// Sends low watermark.
+		[CorrespondingType(typeof(int))]
+		public const int SO_SNDLOWAT = 0x1003;
+
+		/// Sends time-out.
+		[CorrespondingType(typeof(int))]
+		public const int SO_SNDTIMEO = 0x1005;
+
+		/// The type of the socket (for example, SOCK_STREAM).
+		[CorrespondingType(typeof(int))]
+		public const int SO_TYPE = 0x1008;
+
+		///
+		public const int SO_UPDATE_ACCEPT_CONTEXT = 0x700B;
+
+		///
+		public const int SO_USELOOPBACK = 0x0040;
+
 		/// A value that indicates a function failure.
 		public const int SOCKET_ERROR = -1;

+		/// The socket option level.
+		public const int SOL_SOCKET = 0xffff;
+
 		/// Maximum queue length specifiable by listen.
 		public const int SOMAXCONN = 0x7fffffff;
+
+		///
+		public const int TCP_BSDURGENT = 0x7000;
+
+		/// Disables the Nagle algorithm for send coalescing.
+		[CorrespondingType(typeof(BOOL))]
+		public const int TCP_NODELAY = 0x0001;

 		/// The application-specified callback function for <see cref="WSAAccept"/>.
 		/// <param name="lpCallerId">
@@ -677,6 +855,136 @@
 		/// <returns/>
 		public static int SOMAXCONN_HINT(int b) => -b;

+		///
+		/// The <c>CSADDR_INFO</c> structure contains Windows Sockets address information for a socket, network service, or namespace provider.
+		///
+		/// <remarks>
+		/// <para>The GetAddressByName function obtains Windows Sockets address information using <c>CSADDR_INFO</c> structures.</para>
+		/// <para>
+		/// The getsockopt function called with the SO_BSP_STATE socket option retrieves a <c>CSADDR_INFO</c> structure for the specified socket.
+		/// </para>
+		/// </remarks>
+		// https://docs.microsoft.com/en-us/windows/win32/api/nspapi/ns-nspapi-csaddr_info typedef struct _CSADDR_INFO { SOCKET_ADDRESS
+		// LocalAddr; SOCKET_ADDRESS RemoteAddr; INT iSocketType; INT iProtocol; } CSADDR_INFO, *PCSADDR_INFO, *LPCSADDR_INFO;
+		[PInvokeData("nspapi.h", MSDNShortId = "9cad3586-e315-4f6f-9045-7c95502bb768")]
+		[StructLayout(LayoutKind.Sequential)]
+		public struct CSADDR_INFO
+		{
+			///
+			/// <para>Type: <c>SOCKET_ADDRESS</c></para>
+			/// <para>The Windows Sockets local address.</para>
+			/// <para>In a client application, pass this address to the <c>bind</c> function to obtain access to a network service.</para>
+			/// <para>
+			/// In a network service, pass this address to the <c>bind</c> function so that the service is bound to the appropriate local address.
+			/// </para>
+			///
+			public SOCKET_ADDRESS LocalAddr;
+
+			///
+			/// <para>Type: <c>SOCKET_ADDRESS</c></para>
+			/// <para>Windows Sockets remote address.</para>
+			/// <para>There are several uses for this remote address:</para>
+			/// <list type="bullet">
+			/// <item>
+			/// <term>
+			/// You can use this remote address to connect to the service through the connect function. This is useful if an application
+			/// performs send/receive operations that involve connection-oriented protocols.
+			/// </term>
+			/// </item>
+			/// <item>
+			/// <term>
+			/// You can use this remote address with the sendto function when you are communicating over a connectionless (datagram)
+			/// protocol. If you are using a connectionless protocol, such as UDP, <c>sendto</c> is typically the way you pass data to the
+			/// remote system.
+			/// </term>
+			/// </item>
+			/// </list>
+			///
+			public SOCKET_ADDRESS RemoteAddr;
+
+			///
+			/// <para>Type: <c>INT</c></para>
+			/// <para>The type of Windows socket. Possible values for the socket type are defined in the Winsock2.h header file.</para>
+			/// <para>The following table lists the possible values supported for Windows Sockets 2:</para>
+			/// <list type="table">
+			/// <listheader>
+			/// <term>Value</term>
+			/// <term>Meaning</term>
+			/// </listheader>
+			/// <item>
+			/// <term>SOCK_STREAM</term>
+			/// <term>
+			/// A stream socket. This is a protocol that sends data as a stream of bytes, with no message boundaries. This socket type
+			/// provides sequenced, reliable, two-way, connection-based byte streams with an OOB data transmission mechanism. This socket
+			/// type uses the Transmission Control Protocol (TCP) for the Internet address family (AF_INET or AF_INET6).
+			/// </term>
+			/// </item>
+			/// <item>
+			/// <term>SOCK_DGRAM</term>
+			/// <term>
+			/// A datagram socket. This socket type supports datagrams, which are connectionless, unreliable buffers of a fixed (typically
+			/// small) maximum length. This socket type uses the User Datagram Protocol (UDP) for the Internet address family (AF_INET or
+			/// AF_INET6). Services use recvfrom function to obtain datagrams. The listen and accept functions do not work with datagrams.
+			/// </term>
+			/// </item>
+			/// <item>
+			/// <term>SOCK_RDM</term>
+			/// <term>
+			/// A reliable message datagram socket. This socket type preserves message boundaries in data. An example of this type is the
+			/// Pragmatic General Multicast (PGM) multicast protocol implementation in Windows, often referred to as reliable multicast programming.
+			/// </term>
+			/// </item>
+			/// <item>
+			/// <term>SOCK_SEQPACKET</term>
+			/// <term>A sequenced packet stream socket. This socket type provides a pseudo-stream packet based on datagrams.</term>
+			/// </item>
+			/// </list>
+			///
+			public SOCK iSocketType;
+
+			///
+			/// <para>Type: <c>INT</c></para>
+			/// <para>
+			/// The protocol used. The possible options for the protocol parameter are specific to the address family and socket type
+			/// specified. Possible values are defined in the Winsock2.h and Wsrm.h header files.
+			/// </para>
+			/// <para>
+			/// On the Windows SDK released for Windows Vista and later, the organization of header files has changed and this parameter can
+			/// be one of the values from the <c>IPPROTO</c> enumeration type defined in the Ws2def.h header file. Note that the Ws2def.h
+			/// header file is automatically included in Winsock2.h, and should never be used directly.
+			/// </para>
+			/// <para>The table below lists common values for the protocol although many other values are possible.</para>
+			/// <list type="table">
+			/// <listheader>
+			/// <term>protocol</term>
+			/// <term>Meaning</term>
+			/// </listheader>
+			/// <item>
+			/// <term>IPPROTO_TCP 6</term>
+			/// <term>
+			/// The Transmission Control Protocol (TCP). This is a possible value when the address family is AF_INET or AF_INET6 and the
+			/// iSocketType member is SOCK_STREAM.
+			/// </term>
+			/// </item>
+			/// <item>
+			/// <term>IPPROTO_UDP 17</term>
+			/// <term>
+			/// The User Datagram Protocol (UDP). This is a possible value when the address family is AF_INET or AF_INET6 and the
+			/// iSocketType member is SOCK_DGRAM.
+			/// </term>
+			/// </item>
+			/// <item>
+			/// <term>IPPROTO_RM 113</term>
+			/// <term>
+			/// The PGM protocol for reliable multicast. This is a possible value when the address family is AF_INET and the iSocketType
+			/// member is SOCK_RDM. On the Windows SDK released for Windows Vista and later, this value is also called IPPROTO_PGM.
+			/// </term>
+			/// </item>
+			/// </list>
+			///
+			public IPPROTO iProtocol;
+		}
+
 		/// The IN_ADDR structure represents an IPv4 address.
 		[PInvokeData("winsock2.h")]
 		[StructLayout(LayoutKind.Sequential)]
@@ -709,6 +1017,18 @@
 			/// Gets the address represented as four bytes.
 			/// <value>An IPv4 address formatted as four u_chars.</value>
 			public byte[] S_un_b => BitConverter.GetBytes(S_addr);
+
+			///
+			public static readonly IN_ADDR INADDR_ANY = new IN_ADDR(0U);
+
+			///
+			public static readonly IN_ADDR INADDR_LOOPBACK = new IN_ADDR(0x7f000001);
+
+			///
+			public static readonly IN_ADDR INADDR_BROADCAST = new IN_ADDR(0xffffffff);
+
+			///
+			public static readonly IN_ADDR INADDR_NONE = new IN_ADDR(0xffffffff);

 			/// Implements the operator ==.
 			/// <param name="left">The left.</param>
@@ -900,6 +1220,105 @@
 			/// <param name="other">The value to compare with this instance.</param>
 			/// <returns><see langword="true"/> if the specified value is equal to this instance; otherwise, <see langword="false"/>.</returns>
 			public bool Equals(IN6_ADDR other) => lower == other.lower && upper == other.upper;
+		}
+
+		///
+		/// The <c>linger</c> structure maintains information about a specific socket that specifies how that socket should behave when data
+		/// is queued to be sent and the closesocket function is called on the socket.
+		///
+		/// <remarks>
+		/// <para>
+		/// The <c>l_onoff</c> member of the <c>linger</c> structure determines whether a socket should remain open for a specified amount
+		/// of time after a closesocket function call to enable queued data to be sent. Somewhat confusing is that this member can be
+		/// modified in two ways:
+		/// </para>
+		/// <list type="bullet">
+		/// <item>
+		/// <term>
+		/// Call the setsockopt function with the optname parameter set to <c>SO_DONTLINGER</c>. The optval parameter determines how the
+		/// <c>l_onoff</c> member is modified.
+		/// </term>
+		/// </item>
+		/// <item>
+		/// <term>
+		/// Call the setsockopt function with the optname parameter set to <c>SO_LINGER</c>. The optval parameter specifies how both the
+		/// <c>l_onoff</c> and <c>l_linger</c> members are modified.
+		/// </term>
+		/// </item>
+		/// </list>
+		/// <para>
+		/// The <c>l_linger</c> member of the <c>linger</c> structure determines the amount of time, in seconds, a socket should remain
+		/// open. This member is only applicable if the <c>l_onoff</c> member of the <c>linger</c> structure is nonzero.
+		/// </para>
+		/// <para>
+		/// To enable a socket to remain open, an application should set the <c>l_onoff</c> member to a nonzero value and set the
+		/// <c>l_linger</c> member to the desired time-out in seconds. To disable a socket from remaining open, an application only needs to
+		/// set the <c>l_onoff</c> member of the <c>linger</c> structure to zero.
+		/// </para>
+		/// <para>
+		/// If an application calls the setsockopt function with the optname parameter set to <c>SO_DONTLINGER</c> to set the <c>l_onoff</c>
+		/// member to a nonzero value, the value for the <c>l_linger</c> member is not specified. In this case, the time-out used is
+		/// implementation dependent. If a previous time-out has been established for a socket (by enabling SO_LINGER), this time-out value
+		/// should be reinstated by the service provider.
+		/// </para>
+		/// <para>Note that enabling a nonzero timeout on a nonblocking socket is not recommended.</para>
+		/// <para>
+		/// The getsockopt function can be called with the optname parameter set to <c>SO_LINGER</c> to retrieve the current value of the
+		/// <c>linger</c> structure associated with a socket.
+		/// </para>
+		/// </remarks>
+		// https://docs.microsoft.com/en-us/windows/win32/api/winsock/ns-winsock-linger typedef struct linger { u_short l_onoff; u_short
+		// l_linger; } LINGER, *PLINGER, *LPLINGER;
+		[PInvokeData("winsock.h", MSDNShortId = "c1dbabcf-b5cd-4a9d-9bf9-b04c62117d74")]
+		[StructLayout(LayoutKind.Sequential)]
+		public struct LINGER
+		{
+			///
+			/// <para>Type: <c>u_short</c></para>
+			/// <para>
+			/// Specifies whether a socket should remain open for a specified amount of time after a closesocket function call to enable
+			/// queued data to be sent. This member can have one of the following values.
+			/// </para>
+			/// <list type="table">
+			/// <listheader>
+			/// <term>Value</term>
+			/// <term>Meaning</term>
+			/// </listheader>
+			/// <item>
+			/// <term>0</term>
+			/// <term>
+			/// The socket will not remain open. This is the value set if the setsockopt function is called with the optname parameter set
+			/// to SO_DONTLINGER and the optval parameter is zero. This value is also set if the setsockopt function is called with the
+			/// optname parameter set to SO_LINGER and the linger structure passed in the optval parameter has the l_onoff member set to 0.
+			/// </term>
+			/// </item>
+			/// <item>
+			/// <term>nonzero</term>
+			/// <term>
+			/// The socket will remain open for a specified amount of time. This value is set if the setsockopt function is called with the
+			/// optname parameter set to SO_DONTLINGER and the optval parameter is nonzero. This value is also set if the setsockopt
+			/// function is called with the optname parameter set to SO_LINGER and the linger structure passed in the optval parameter has
+			/// the l_onoff member set to a nonzero value.
+			/// </term>
+			/// </item>
+			/// </list>
+			///
+			public ushort l_onoff;
+
+			///
+			/// <para>Type: <c>u_short</c></para>
+			/// <para>
+			/// The linger time in seconds. This member specifies how long to remain open after a closesocket function call to enable queued
+			/// data to be sent. This member is only applicable if the <c>l_onoff</c> member of the <c>linger</c> structure is set to a
+			/// nonzero value.
+			/// </para>
+			/// <para>
+			/// This value is set if the setsockopt function is called with the optname parameter set to <c>SO_LINGER</c>. The optval
+			/// parameter passed to the <c>setsockopt</c> function must contain a <c>linger</c> structure that is copied to the internal
+			/// <c>linger</c> structure maintained for the socket.
+			/// </para>
+			///
+			public ushort l_linger;
 		}

 		///
@@ -1634,7 +2053,7 @@
 			/// direction, two WSAPROTOCOL_INFOW structures should be used. When neither bit is set, the protocol is considered to be bidirectional.
 			/// </para>
 			///
-			public uint dwServiceFlags1;
+			public XP1 dwServiceFlags1;

 			///
 			/// <para>Type: <c>DWORD</c></para>
@@ -1877,7 +2296,7 @@
 			/// </item>
 			/// </list>
 			///
-			public int iSocketType;
+			public SOCK iSocketType;

 			///
 			/// <para>Type: <c>int</c></para>
@@ -1935,7 +2354,7 @@
 			/// </item>
 			/// </list>
 			///
-			public int iProtocol;
+			public IPPROTO iProtocol;

 			///
 			/// <para>Type: <c>int</c></para>
@@ -2155,6 +2574,14 @@
 			/// <param name="addr">The <see cref="SOCKADDR_IN6"/> value to assign.</param>
 			public SOCKADDR(SOCKADDR_IN6 addr) : base(Marshal.SizeOf(typeof(SOCKADDR_IN6))) => Marshal.StructureToPtr(addr, handle, false);

+			/// Initializes a new instance of the <see cref="SOCKADDR"/> class.
+			/// <param name="ipAddress">The ip address.</param>
+			public SOCKADDR(IPAddress ipAddress) : this(ipAddress.GetAddressBytes()) { }
+
+			/// Initializes a new instance of the <see cref="SOCKADDR"/> class.
+			/// <param name="socketAddress">The socket address.</param>
+			public SOCKADDR(IPEndPoint endPoint) : this(endPoint.Address.GetAddressBytes(), (ushort)endPoint.Port) { }
+
 			/// Gets an instance that represents an empty address.
 			public static SOCKADDR Empty => new SOCKADDR(new byte[Marshal.SizeOf(typeof(IN6_ADDR))]);


Fix method documented return value (#34264)

--- src/Identity/Core/src/SignInManager.cs
+++ src/Identity/Core/src/SignInManager.cs
@@ -266,7 +266,7 @@
         /// </summary>
         /// <param name="principal">The principal whose stamp should be validated.</param>
         /// <returns>The task object representing the asynchronous operation. The task will contain the <typeparamref name="TUser"/>
-        /// if the stamp matches the persisted value, otherwise it will return false.</returns>
+        /// if the stamp matches the persisted value, otherwise it will return null.</returns>
         public virtual async Task<TUser> ValidateSecurityStampAsync(ClaimsPrincipal principal)
         {
             if (principal == null)
@@ -289,7 +289,7 @@
         /// </summary>
         /// <param name="principal">The principal whose stamp should be validated.</param>
         /// <returns>The task object representing the asynchronous operation. The task will contain the <typeparamref name="TUser"/>
-        /// if the stamp matches the persisted value, otherwise it will return false.</returns>
+        /// if the stamp matches the persisted value, otherwise it will return null.</returns>
         public virtual async Task<TUser> ValidateTwoFactorSecurityStampAsync(ClaimsPrincipal principal)
         {
             if (principal == null || principal.Identity?.Name == null)


Updated verison number to 1.1

Updated verison number to 1.1

--- Properties/AssemblyInfo.cs
+++ Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0")]
-[assembly: AssemblyFileVersion("0.1")]
+[assembly: AssemblyVersion("1.1")]
+[assembly: AssemblyFileVersion("0.2")]


Updated version from 0.2 to 0.3.

Updated version from 0.2 to 0.3.

--- Properties/AssemblyInfo.cs
+++ Properties/AssemblyInfo.cs
@@ -5,5 +5,5 @@
 [assembly: AssemblyCopyright("© 2014 Xanotech LLC")]
 [assembly: AssemblyProduct("XRepository")]

-[assembly: AssemblyFileVersion("0.2")]
-[assembly: AssemblyVersion("0.2")]+[assembly: AssemblyFileVersion("0.3")]
+[assembly: AssemblyVersion("0.3")]


Better pusher:error handing

Better pusher:error handing

--- PusherClient/Connection.cs
+++ PusherClient/Connection.cs
@@ -240,13 +240,15 @@

         private void ParseError(string data)
         {
-            var template = new { message = String.Empty, code = 0 };
+            var template = new { message = String.Empty, code = (int?) null };
             var parsed = JsonConvert.DeserializeAnonymousType(data, template);

             ErrorCodes error = ErrorCodes.Unkown;

-            if (Enum.IsDefined(typeof(ErrorCodes), parsed.code))
+            if (parsed.code != null && Enum.IsDefined(typeof(ErrorCodes), parsed.code))
+            {
                 error = (ErrorCodes)parsed.code;
+            }

             RaiseError(new PusherException(parsed.message, error));
         }


changes to the standings view colours on the all regions view

--- RegionsViewControl.xaml.cs
+++ RegionsViewControl.xaml.cs
@@ -334,17 +334,17 @@

                     averageStanding = averageStanding / numSystems;

-                    if (averageStanding > 0.5)
-                    {
-                        Color blueIsh = Colors.Gray;
-                        blueIsh.B += (byte)((255 - blueIsh.B) * (averageStanding / 10.0f));
+                    if (averageStanding > 0.55)
+                    {
+                        Color blueIsh = Colors.Black;
+                        blueIsh.B = (byte)(255 * (averageStanding / 10.0f));
                         regionShape.Fill = new SolidColorBrush(blueIsh);
                     }
-                    else if (averageStanding < -0.5)
+                    else if (averageStanding < -0.55)
                     {
                         averageStanding *= -1;
-                        Color redIsh = Colors.Gray;
-                        redIsh.R += (byte)((255 - redIsh.R) * (averageStanding / 10.0f));
+                        Color redIsh = Colors.Black;
+                        redIsh.R = (byte)(255 * (averageStanding / 10.0f));
                         regionShape.Fill = new SolidColorBrush(redIsh);
                     }
                     else


Remove PODVector generators

Remove PODVector generators

--- SharpieBinder/CxxBinder.cs
+++ SharpieBinder/CxxBinder.cs
@@ -86,7 +86,6 @@

 		TypeDeclaration currentType;
 		StreamWriter cbindingStream;
-		StreamWriter podStream;

 		public CxxBinder(string outputDir)
 		{
@@ -100,11 +99,6 @@
 				["Urho3D::Skeleton"] = new BaseNodeType(Bind),
 			};
 			cbindingStream = File.CreateText(Path.Combine(outputDir, "binding.cpp"));
-			podStream = File.CreateText (Path.Combine (outputDir, "PodVectors.cs"));
-			podStream.WriteLine ("// Autogenerated, do not edit");
-			podStream.WriteLine ("using System;");
-			podStream.WriteLine ("using System.Runtime.InteropServices;");
-			podStream.WriteLine ("namespace Urho {");
 			pn("// Autogenerated, do not edit");
 			pn("#include \"../../Native/AllUrho.h\"");
 			pn("#include \"../../Native/interop.h\"");
@@ -113,57 +107,10 @@

 		}

-		static string FlattenVectorName (string p)
-		{
-			return p.Replace ("<", "_").Replace (">", "").Replace (" ", "").Replace ("::", "__").Replace("*","Ptr").Replace ("classUrho3D_", "");
-		}
-
-		void GeneratePodVector ()
-		{
-			var ps = podStream;
-			ps.WriteLine ("\tinternal class PodVectorHelper {");
-
-			foreach (var p in podClasses) {
-				Console.WriteLine (p);
-				var flatName = FlattenVectorName (p);
-				pn ("DllExport {0}* {1}_new ()", p, flatName);
-				pn ("{");
-				pn ("\treturn new {0} ();", p.Replace ("class ", "").Trim ());
-				pn ("}\n\n");
-				pn ($"DllExport void {flatName}_destroy ({p} *obj)");
-				pn ("{");
-				pn ("\tdelete obj;");
-				pn ("}\n");
-				pn ($"DllExport int ${flatName}_count ({p} *obj)");
-				pn ("{");
-				pn ($"\treturn obj->Size ();");
-				pn ("}");
-				pn ($"DllExport void *${flatName}_item ({p} *obj, int idx)");
-				pn ("{");
-				pn ("\treturn &(*obj)[idx];");
-				pn ("}");
-
-				ps.WriteLine ("\t\t[DllImport (Consts.NativeImport, CallingConvention=CallingConvention.Cdecl)]");
-				ps.WriteLine ($"\t\tinternal extern static IntPtr {flatName}_new ();");
-				ps.WriteLine ("\t\t[DllImport (Consts.NativeImport, CallingConvention=CallingConvention.Cdecl)]");
-				ps.WriteLine ($"\t\tinternal extern static void {flatName}_destroy (IntPtr handle);");
-				ps.WriteLine ("\t\t[DllImport (Consts.NativeImport, CallingConvention=CallingConvention.Cdecl)]");
-				ps.WriteLine ($"\t\tinternal extern static int {flatName}_count (IntPtr handle);");
-				ps.WriteLine ("\t\t[DllImport (Consts.NativeImport, CallingConvention=CallingConvention.Cdecl)]");
-				ps.WriteLine ($"\t\tinternal extern static IntPtr {flatName}_item (IntPtr handle, int item);");
-				var elementType = p.Replace ("PODVEctor<class ", "").Trim ('>', '*', ' ');
-			}
-			ps.WriteLine ("\t}\n}");
-			foreach (var p in missingPodClasses)
-				Console.WriteLine ("PodClassMissing: {0}", p);
-		}
-
 		public void Close()
 		{
-			GeneratePodVector ();
 			pn ("}");
 			cbindingStream.Close();
-			podStream.Close ();
 			cbindingStream = null;
 		}


regular backup

regular backup

--- SteamBot/KeyUserHandler.cs
+++ SteamBot/KeyUserHandler.cs
@@ -18,8 +18,8 @@
 	{
 		private const string BotVersion = "3.2.0";
 		public TF2Value UserMetalAdded, NonTradeInventoryMetal, InventoryMetal, BotMetalAdded, ExcessRefined, KeysToScrap, AdditionalRefined, ChangeAdded, LeftoverMetal;
-		public static TF2Value SellPricePerKey = TF2Value.FromRef(18.33); //high
-		public static TF2Value BuyPricePerKey = TF2Value.FromRef(17.88); //low
+		public static TF2Value SellPricePerKey = TF2Value.FromRef(18.22); //high
+		public static TF2Value BuyPricePerKey = TF2Value.FromRef(17.77); //low

 		int KeysCanBuy, NonTradeKeysCanBuy, ValidateMetaltoKey, PreviousKeys, UserKeysAdded, BotKeysAdded, InventoryKeys, NonTradeInventoryKeys, IgnoringBot, ScamAttempt, NonTradeScrap, Scrap, ScrapAdded, NonTradeReclaimed, Reclaimed, ReclaimedAdded, NonTradeRefined, Refined, RefinedAdded, InvalidItem, NumKeys, TradeFrequency;
         double Item;


Added a new method to delete a run.

Added a new method to delete a run.

--- TestRail/TestRailClient.cs
+++ TestRail/TestRailClient.cs
@@ -558,6 +558,15 @@
         public CommandResult<ulong> DeleteSuite(ulong suiteID)
         {
             var uri = _CreateUri_(_CommandType_.delete, _NODE_SUITE_, suiteID);
+            return _SendCommand(uri);
+        }
+
+        /// <summary>Delete the run</summary>
+        /// <param name="runID">id of the run to delete</param>
+        /// <returns>result of the deletion</returns>
+        public CommandResult<ulong> DeleteRun(ulong runID)
+        {
+            var uri = _CreateUri_(_CommandType_.delete, _NODE_RUN_, runID);
             return _SendCommand(uri);
         }
         #endregion Delete Commands


[V2] Added note about auto-property initializers in C#6.0

--- packages/C/dev/Scripts/ICCompilerOptions.cs
+++ packages/C/dev/Scripts/ICCompilerOptions.cs
@@ -104,6 +104,8 @@

                 var attribute = attributeArray[0] as Bam.Core.V2.SettingsExtensionsAttribute;

+                // TODO: the Empty function could be replaced by the auto-property initializers in C#6.0 (when Mono catches up)
+                // although it won't then be a centralized definition, so the extension method as-is is probably better
                 if (emptyFirst)
                 {
                     var emptyMethod = attribute.GetMethod("Empty", new[] { i });


--- wix.d/MinionConfigurationExtension/MinionConfiguration.cs
+++ wix.d/MinionConfigurationExtension/MinionConfiguration.cs
@@ -406,6 +406,7 @@
         string MINION_CONFIGFILE = getConfigFileLocation(session);
         string MINION_CONFIGDIR = MINION_CONFIGFILE + ".d";
         string zmq_config_file = MINION_CONFIGDIR + "\\" + "zmq_filtering.conf";
+        System.IO.Directory.CreateDirectory(MINION_CONFIGDIR);  // Ensures that the path to conf/minion.d exists
         File.WriteAllText(zmq_config_file, "zmq_filtering: True" + Environment.NewLine);
         session.Log(@"DECA_WriteConfig created and wrote zmq_filtering.conf");
       }


fix cross referencing models in relative swagger specs (#1805)

--- src/modeler/AutoRest.Swagger/SwaggerParser.cs
+++ src/modeler/AutoRest.Swagger/SwaggerParser.cs
@@ -96,7 +96,7 @@
                     {
                         currentDoc[entityType][modelName] = externalFiles[filePath][entityType][modelName];
                         //recursively check if the model is completely defined.
-                        EnsureCompleteDefinitionIsPresent(visitedEntities, externalFiles, currentFilePath, entityType, modelName, externalFiles[filePath]);
+                        EnsureCompleteDefinitionIsPresent(visitedEntities, externalFiles, filePath, entityType, modelName, externalFiles[filePath]);
                     }
                     else
                     {


Fix spelling misstake

Fix spelling misstake

Former-commit-id: c2817e927640e9f2ca1ab43002b53ab37f17cf33

--- GeneratorAPI/src/Linq/Generator.cs
+++ GeneratorAPI/src/Linq/Generator.cs
@@ -187,7 +187,7 @@
         /// <exception cref="ArgumentNullException">Argument <paramref name="generator" /> is null.</exception>
         /// <returns>
         ///     A <see cref="IGenerator{T}" /> whose elements are the result of invoking the transform function on each element
-        ///     genrated by
+        ///     generated by
         ///     <paramref name="generator" />.
         /// </returns>
         /// <example>
@@ -263,7 +263,7 @@
         /// <summary>
         ///     <para>
         ///         Creates a <see cref="IGenerator{T}" /> by flattening a <see cref="IGenerator{T}" /> with another
-        ///         <see cref="IGenerator{T}" /> for each invokation of <see cref="IGenerator{T}.Generate" />.
+        ///         <see cref="IGenerator{T}" /> for each invocation of <see cref="IGenerator{T}.Generate" />.
         ///     </para>
         /// </summary>
         /// <typeparam name="TSource">
@@ -294,7 +294,7 @@
         /// <summary>
         ///     <para>
         ///         Creates a <see cref="IGenerator{T}" /> by flattening a <see cref="IGenerator{T}" /> with another
-        ///         <see cref="IGenerator{T}" /> for each invokation of <see cref="IGenerator{T}.Generate" />.
+        ///         <see cref="IGenerator{T}" /> for each invocation of <see cref="IGenerator{T}.Generate" />.
         ///     </para>
         /// </summary>
         /// <typeparam name="TSource">


Version 0.20

Version 0.20

--- GitMind/Properties/AssemblyInfo.cs
+++ GitMind/Properties/AssemblyInfo.cs
@@ -50,7 +50,7 @@
 //
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
-[assembly: AssemblyVersion("0.19.*")]
+[assembly: AssemblyVersion("0.20.*")]

 [assembly: InternalsVisibleTo("GitMindTest")]


Changed project version in Asembly Info

Changed project version in Asembly Info

--- GooDPal/Properties/AssemblyInfo.cs
+++ GooDPal/Properties/AssemblyInfo.cs
@@ -1,12 +1,13 @@
 using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
+using System.Resources;

 // General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("GooDPal")]
-[assembly: AssemblyDescription("")]
+[assembly: AssemblyDescription("Google drive manager tool by TheCrafter.")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("GooDPal")]
@@ -32,5 +33,6 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("0.0.0.1")]
+[assembly: AssemblyFileVersion("0.0.0.1")]
+[assembly: NeutralResourcesLanguageAttribute("en-US")]


Tweak logic for when Application disposes the process.

--- Gu.Wpf.UiAutomation/Application.cs
+++ Gu.Wpf.UiAutomation/Application.cs
@@ -16,7 +16,7 @@
         /// <summary>
         /// The process of this application.
         /// </summary>
-        private readonly Process process;
+        private readonly ProcessReference processReference;
         private bool disposed;

         /// <summary>
@@ -25,7 +25,7 @@
         /// <param name="processId">The process id.</param>
         /// <param name="isStoreApp">Flag to define if it's a store app or not.</param>
         public Application(int processId, bool isStoreApp = false)
-            : this(FindProcess(processId), isStoreApp)
+            : this(new ProcessReference(FindProcess(processId), dispose: false), isStoreApp)
         {
         }

@@ -34,9 +34,9 @@
         /// </summary>
         /// <param name="process">The process, NOTE: the process is disposed with this instance.</param>
         /// <param name="isStoreApp">Flag to define if it's a store app or not.</param>
-        private Application(Process process, bool isStoreApp = false)
-        {
-            this.process = process ?? throw new ArgumentNullException(nameof(process));
+        private Application(ProcessReference process, bool isStoreApp = false)
+        {
+            this.processReference = process;
             this.IsStoreApp = isStoreApp;
             this.Automation = new UIA3Automation();
         }
@@ -51,28 +51,28 @@
         /// <summary>
         /// The proces Id of the application.
         /// </summary>
-        public int ProcessId => this.process.Id;
+        public int ProcessId => this.processReference.Process.Id;

         /// <summary>
         /// The name of the application's process.
         /// </summary>
-        public string Name => this.process.ProcessName;
+        public string Name => this.processReference.Process.ProcessName;

         /// <summary>
         /// The current handle (Win32) of the application's main window.
         /// Can be IntPtr.Zero if no main window is currently available.
         /// </summary>
-        public IntPtr MainWindowHandle => this.process.MainWindowHandle;
+        public IntPtr MainWindowHandle => this.processReference.Process.MainWindowHandle;

         /// <summary>
         /// Gets a value indicating whether the associated process has been terminated.
         /// </summary>
-        public bool HasExited => this.process.HasExited;
+        public bool HasExited => this.processReference.Process.HasExited;

         /// <summary>
         /// Gets the value that the associated process specified when it terminated.
         /// </summary>
-        public int ExitCode => this.process.ExitCode;
+        public int ExitCode => this.processReference.Process.ExitCode;

         /// <summary>
         /// Closes the application. Force-closes it after a small timeout.
@@ -82,23 +82,23 @@
         {
             Logger.Default.Debug("Closing application");
             if (this.disposed ||
-                this.process.HasExited)
+                this.processReference.Process.HasExited)
             {
                 return true;
             }

-            this.process.CloseMainWindow();
+            this.processReference.Process.CloseMainWindow();
             if (this.IsStoreApp)
             {
                 return true;
             }

-            this.process.WaitForExit(5000);
-            if (!this.process.HasExited)
+            this.processReference.Process.WaitForExit(5000);
+            if (!this.processReference.Process.HasExited)
             {
                 Logger.Default.Info("Application failed to exit, killing process");
-                this.process.Kill();
-                this.process.WaitForExit(5000);
+                this.processReference.Process.Kill();
+                this.processReference.Process.WaitForExit(5000);
                 return false;
             }

@@ -112,13 +112,13 @@
         {
             try
             {
-                if (this.process.HasExited)
+                if (this.processReference.Process.HasExited)
                 {
                     return;
                 }

-                this.process.Kill();
-                this.process.WaitForExit();
+                this.processReference.Process.Kill();
+                this.processReference.Process.WaitForExit();
             }
             catch
             {
@@ -139,10 +139,10 @@
         /// <summary>
         /// Attach to a running process
         /// </summary>
-        public static Application Attach(Process process)
+        public static Application Attach(Process process, bool dispose = false)
         {
             Logger.Default.Debug($"[Attaching to process:{process.Id}] [Process name:{process.ProcessName}] [Process full path:{process.MainModule.FileName}]");
-            return new Application(process);
+            return new Application(new ProcessReference(process, dispose));
         }

         /// <summary>
@@ -200,19 +200,17 @@
             }
             catch (Win32Exception ex)
             {
-                var error =
-                    $"[Failed Launching process:{processStartInfo.FileName}] [Working directory:{new DirectoryInfo(processStartInfo.WorkingDirectory).FullName}] [Process full path:{new FileInfo(processStartInfo.FileName).FullName}] [Current Directory:{Environment.CurrentDirectory}]";
+                var error = $"[Failed Launching process:{processStartInfo.FileName}] [Working directory:{new DirectoryInfo(processStartInfo.WorkingDirectory).FullName}] [Process full path:{new FileInfo(processStartInfo.FileName).FullName}] [Current Directory:{Environment.CurrentDirectory}]";
                 Logger.Default.Error(error, ex);
                 throw;
             }

-            return new Application(process);
+            return new Application(new ProcessReference(process, dispose: true));
         }

         public static Application LaunchStoreApp(string appUserModelId, string arguments = null)
         {
-            var process = WindowsStoreAppLauncher.Launch(appUserModelId, arguments);
-            return new Application(process, isStoreApp: true);
+            return new Application(new ProcessReference(WindowsStoreAppLauncher.Launch(appUserModelId, arguments), dispose: true), isStoreApp: true);
         }

         /// <summary>
@@ -223,7 +221,7 @@
         {
             this.ThrowIfDisposed();
             var waitTime = (waitTimeout ?? TimeSpan.FromMilliseconds(-1)).TotalMilliseconds;
-            this.process.WaitForInputIdle((int)waitTime);
+            this.processReference.Process.WaitForInputIdle((int)waitTime);
         }

         /// <summary>
@@ -236,8 +234,8 @@
             Retry.While(
                 () =>
                 {
-                    this.process.Refresh();
-                    return this.process.MainWindowHandle == IntPtr.Zero;
+                    this.processReference.Process.Refresh();
+                    return this.processReference.Process.MainWindowHandle == IntPtr.Zero;
                 },
                 waitTime,
                 TimeSpan.FromMilliseconds(50));
@@ -292,8 +290,9 @@
             this.disposed = true;
             if (disposing)
             {
-                this.process.Dispose();
-                this.Automation?.Dispose();
+                this.Close();
+                this.processReference.Dispose();
+                this.Automation.Dispose();
             }
         }

@@ -322,5 +321,27 @@
         {
             return Process.GetProcessesByName(Path.GetFileNameWithoutExtension(executable));
         }
+
+        private sealed class ProcessReference : IDisposable
+        {
+            internal readonly Process Process;
+            internal readonly bool dispose;
+
+            public ProcessReference(Process process, bool dispose)
+            {
+                this.Process = process;
+                this.dispose = dispose;
+            }
+
+            public void Dispose()
+            {
+                if (this.dispose)
+                {
+#pragma warning disable GU0036 // Don't dispose injected.
+                    this.Process.Dispose();
+#pragma warning restore GU0036 // Don't dispose injected.
+                }
+            }
+        }
     }
 }


Remove double spacing in comments

Remove double spacing in comments

--- osu.Framework/Platform/IWindow.cs
+++ osu.Framework/Platform/IWindow.cs
@@ -72,7 +72,7 @@

         /// <summary>
         /// Provides a <see cref="IBindable{MarginPadding}"/> that can be used to keep track of the "safe area" insets on mobile
-        /// devices.  This usually corresponds to areas of the screen hidden under notches and rounded corners.
+        /// devices. This usually corresponds to areas of the screen hidden under notches and rounded corners.
         /// The safe area insets are provided by the operating system and dynamically change as the user rotates the device.
         /// </summary>
         IBindable<MarginPadding> SafeAreaPadding { get; }


update) 1.1.4

update) 1.1.4

--- HUSauth/Properties/AssemblyInfo.cs
+++ HUSauth/Properties/AssemblyInfo.cs
@@ -46,5 +46,5 @@
 // すべての値を指定するか、下のように '*' を使ってビルドおよびリビジョン番号を
 // 既定値にすることができます:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.1.3.*")]
+[assembly: AssemblyVersion("1.1.4.*")]
 [assembly: AssemblyFileVersion("1.0.0.0")]


implement custom tooltip for DrawableDate

--- osu.Game/Graphics/DrawableDate.cs
+++ osu.Game/Graphics/DrawableDate.cs
@@ -4,13 +4,16 @@
 using System;
 using osu.Framework.Allocation;
 using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
 using osu.Framework.Graphics.Cursor;
+using osu.Framework.Graphics.Shapes;
 using osu.Game.Graphics.Sprites;
 using osu.Game.Utils;
+using osuTK;

 namespace osu.Game.Graphics
 {
-    public class DrawableDate : OsuSpriteText, IHasTooltip
+    public class DrawableDate : OsuSpriteText, IHasCustomTooltip
     {
         private DateTimeOffset date;

@@ -75,6 +78,74 @@

         private void updateTime() => Text = Format();

-        public virtual string TooltipText => string.Format($"{Date:MMMM d, yyyy h:mm tt \"UTC\"z}");
+        public ITooltip GetCustomTooltip() => new DateTooltip();
+
+        public object TooltipContent => Date;
+
+        private class DateTooltip : VisibilityContainer, ITooltip
+        {
+            private readonly OsuSpriteText dateText, timeText;
+            private readonly Box background;
+
+            public DateTooltip()
+            {
+                AutoSizeAxes = Axes.Both;
+                Masking = true;
+                CornerRadius = 5;
+
+                Children = new Drawable[]
+                {
+                    background = new Box
+                    {
+                        RelativeSizeAxes = Axes.Both
+                    },
+                    new FillFlowContainer
+                    {
+                        AutoSizeAxes = Axes.Both,
+                        Direction = FillDirection.Horizontal,
+                        Padding = new MarginPadding(10),
+                        Children = new Drawable[]
+                        {
+                            dateText = new OsuSpriteText
+                            {
+                                Font = OsuFont.GetFont(size: 12, weight: FontWeight.Bold),
+                                Anchor = Anchor.BottomLeft,
+                                Origin = Anchor.BottomLeft,
+                            },
+                            timeText = new OsuSpriteText
+                            {
+                                Font = OsuFont.GetFont(size: 12, weight: FontWeight.Regular),
+                                Anchor = Anchor.BottomLeft,
+                                Origin = Anchor.BottomLeft,
+                            }
+                        }
+                    },
+                };
+            }
+
+            [BackgroundDependencyLoader]
+            private void load(OsuColour colours)
+            {
+                // Temporary colour since it's currently impossible to change it without bugs (see https://github.com/ppy/osu-framework/issues/3231)
+                // If above is fixed, this should use OverlayColourProvider
+                background.Colour = colours.Gray1;
+                timeText.Colour = colours.GreyCyanLighter;
+            }
+
+            protected override void PopIn() => this.FadeIn(200, Easing.OutQuint);
+            protected override void PopOut() => this.FadeOut(200, Easing.OutQuint);
+
+            public bool SetContent(object content)
+            {
+                if (!(content is DateTimeOffset date))
+                    return false;
+
+                dateText.Text = string.Format($"{date:d MMMM yyyy}") + " ";
+                timeText.Text = string.Format($"{date:hh:mm:ss \"UTC\"z}");
+                return true;
+            }
+
+            public void Move(Vector2 pos) => Position = pos;
+        }
     }
 }


Fix cancelled webrequests triggering exceptions

--- osu.Game/Online/API/APIRequest.cs
+++ osu.Game/Online/API/APIRequest.cs
@@ -92,7 +92,11 @@

         public void Fail(Exception e)
         {
-            if (cancelled) return;
+            if (WebRequest?.Completed == true)
+                return;
+
+            if (cancelled)
+                return;

             cancelled = true;
             WebRequest?.Abort();


Fixed build error by removing a bracket

Fixed build error by removing a bracket

--- HelloWorldWH/HelloWorldWH/Form1.cs
+++ HelloWorldWH/HelloWorldWH/Form1.cs
@@ -256,4 +256,4 @@
             }
         }
     }
-}
+


Only log that the rulesets could not be loaded from a directory.

--- osu.Game/Rulesets/RulesetStore.cs
+++ osu.Game/Rulesets/RulesetStore.cs
@@ -31,9 +31,9 @@
                 foreach (string file in files.Where(f => !Path.GetFileName(f).Contains("Tests")))
                     loadRulesetFromFile(file);
             }
-            catch (Exception e)
+            catch
             {
-                Logger.Error(e, $"Could not load rulesets from directory {Environment.CurrentDirectory}");
+                Logger.Log($"Could not load rulesets from directory {Environment.CurrentDirectory}");
             }
         }


A bit more docu

A bit more docu

--- Hermod/HTTP/Request/QueryString.cs
+++ Hermod/HTTP/Request/QueryString.cs
@@ -31,13 +31,20 @@
 {

     /// <summary>
-    /// Extention methods for the QueryString class.
+    /// Extention methods for the HTTP QueryString class.
     /// </summary>
     public static class QueryStringExtentions
     {

         #region CreateStringFilter(this QueryString, ParameterName, FilterDelegate)

+        /// <summary>
+        /// Create a filter based on the given HTTP query parameter.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="QueryString">A HTTP query string.</param>
+        /// <param name="ParameterName">The name of the query parameter.</param>
+        /// <param name="FilterDelegate">A filter delegate.</param>
         public static Func<T, Boolean> CreateStringFilter<T>(this QueryString          QueryString,
                                                              String                    ParameterName,
                                                              Func<T, String, Boolean>  FilterDelegate)
@@ -53,7 +60,7 @@

             }

-            return item => true;
+            return _ => true;

         }

@@ -62,6 +69,12 @@

         #region GetDateTimeOrDefault(this QueryString, ParameterName, DefaultValue = null)

+        /// <summary>
+        /// Get a timestamp from a HTTP query parameter.
+        /// </summary>
+        /// <param name="QueryString">A HTTP query string.</param>
+        /// <param name="ParameterName">The name of the query parameter.</param>
+        /// <param name="DefaultValue">An optional default timestamp.</param>
         public static DateTime? GetDateTimeOrDefault(this QueryString  QueryString,
                                                      String            ParameterName,
                                                      DateTime?         DefaultValue  = null)
@@ -79,8 +92,37 @@

         #endregion

+        #region TryGetDateTime      (this QueryString, ParameterName)
+
+        /// <summary>
+        /// Try to get a timestamp from a HTTP query parameter.
+        /// </summary>
+        /// <param name="QueryString">A HTTP query string.</param>
+        /// <param name="ParameterName">The name of the query parameter.</param>
+        public static DateTime? TryGetDateTime(this QueryString  QueryString,
+                                               String            ParameterName)
+        {
+
+            if (QueryString.TryGetString(ParameterName, out String Value) &&
+                DateTime.TryParse(Value, out DateTime Timestamp))
+            {
+                return Timestamp;
+            }
+
+            return null;
+
+        }
+
+        #endregion
+
         #region TryGetDateTime      (this QueryString, ParameterName, out Timestamp)

+        /// <summary>
+        /// Try to get a timestamp from a HTTP query parameter.
+        /// </summary>
+        /// <param name="QueryString">A HTTP query string.</param>
+        /// <param name="ParameterName">The name of the query parameter.</param>
+        /// <param name="Timestamp">The parsed timestamp.</param>
         public static Boolean TryGetDateTime(this QueryString  QueryString,
                                              String            ParameterName,
                                              out DateTime      Timestamp)
@@ -101,6 +143,13 @@

         #region CreateDateTimeFilter(this QueryString, ParameterName, FilterDelegate)

+        /// <summary>
+        /// Create a timestamp filter based on the given HTTP query parameter.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="QueryString">A HTTP query string.</param>
+        /// <param name="ParameterName">The name of the query parameter.</param>
+        /// <param name="FilterDelegate">A filter delegate.</param>
         public static Func<T, Boolean> CreateDateTimeFilter<T>(this QueryString            QueryString,
                                                                String                      ParameterName,
                                                                Func<T, DateTime, Boolean>  FilterDelegate)
@@ -112,7 +161,7 @@
                 return item => FilterDelegate(item, Timestamp);
             }

-            return item => true;
+            return _ => true;

         }

@@ -124,6 +173,7 @@
         /// <summary>
         /// Parse optional from-timestamp filter...
         /// </summary>
+        /// <param name="QueryString">A HTTP query string.</param>
         public static DateTime? ParseFromTimestampFilter(this QueryString  QueryString)
         {

@@ -141,6 +191,7 @@
         /// <summary>
         /// Parse optional to-timestamp filter...
         /// </summary>
+        /// <param name="QueryString">A HTTP query string.</param>
         public static DateTime? ParseToTimestampFilter(this QueryString  QueryString)
         {

@@ -158,6 +209,9 @@
         /// <summary>
         /// Parse optional from-/to-timestamp filters...
         /// </summary>
+        /// <param name="QueryString">A HTTP query string.</param>
+        /// <param name="FromTimestamp">The optional 'from' query parameter.</param>
+        /// <param name="ToTimestamp">The optional 'to' query parameter.</param>
         public static void ParseFromToTimestampFilters(this QueryString  QueryString,
                                                        out  DateTime?    FromTimestamp,
                                                        out  DateTime?    ToTimestamp)


Removed Complex class because it was ridiculously slow

--- mbrot/Complex.cs
+++ mbrot/Complex.cs
@@ -1,63 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace mbrot
-{
-    public struct Complex : IEquatable<Complex>
-    {
-        public double Real;
-        public double Imag;
-
-        public Complex(double real, double imag)
-        {
-            this.Real = real;
-            this.Imag = imag;
-        }
-
-
-        public static Complex operator +(Complex c1, Complex c2)
-        {
-            return new Complex(c1.Real + c2.Real, c1.Imag + c2.Imag);
-        }
-
-        public static Complex operator -(Complex c1, Complex c2)
-        {
-            return new Complex(c1.Real - c2.Real, c1.Imag - c2.Imag);
-        }
-
-        public static Complex operator *(Complex c1, Complex c2)
-        {
-            return new Complex(c1.Real * c2.Real - c1.Imag * c2.Imag, c1.Real * c2.Imag + c2.Real * c1.Imag);
-        }
-
-        public static Complex operator /(Complex c1, Complex c2)
-        {
-            double denominator = c2.Real * c2.Real + c2.Imag * c2.Imag;
-            Complex numerator = c1 * Conjugate(c2);
-            return new Complex(numerator.Real / denominator, numerator.Imag / denominator);
-        }
-
-        public static Complex Conjugate(Complex other)
-        {
-            return new Complex(other.Real, other.Imag * -1);
-        }
-
-        public override string ToString()
-        {
-            return (String.Format("{0} + {1}i", Real, Imag));
-        }
-
-        public static double Magnitude(Complex c1)
-        {
-            return Math.Sqrt(c1.Real * c1.Real + c1.Imag * c1.Imag);
-        }
-
-        public bool Equals(Complex other)
-        {
-            return (this.Imag == other.Imag && this.Real == other.Real);
-        }
-    }
-}


Open login overlay if user isn't signed in after intro sequence (#6038)

Open login overlay if user isn't signed in after intro sequence

Co-authored-by: Dean Herbert <1db828bcd41de75377dce59825af73ae7fca5651@ppy.sh>

--- osu.Game/Screens/Menu/MainMenu.cs
+++ osu.Game/Screens/Menu/MainMenu.cs
@@ -11,6 +11,7 @@
 using osu.Game.Beatmaps;
 using osu.Game.Graphics;
 using osu.Game.Graphics.Containers;
+using osu.Game.Online.API;
 using osu.Game.Overlays;
 using osu.Game.Screens.Backgrounds;
 using osu.Game.Screens.Charts;
@@ -43,6 +44,12 @@

         [Resolved(canBeNull: true)]
         private MusicController music { get; set; }
+
+        [Resolved(canBeNull: true)]
+        private LoginOverlay login { get; set; }
+
+        [Resolved]
+        private IAPIProvider api { get; set; }

         private BackgroundScreenDefault background;

@@ -133,6 +140,8 @@
             Beatmap.ValueChanged += beatmap_ValueChanged;
         }

+        private bool loginDisplayed;
+
         protected override void LogoArriving(OsuLogo logo, bool resuming)
         {
             base.LogoArriving(logo, resuming);
@@ -150,6 +159,21 @@
                 this.MoveTo(new Vector2(0, 0), FADE_IN_DURATION, Easing.OutQuint);

                 sideFlashes.Delay(FADE_IN_DURATION).FadeIn(64, Easing.InQuint);
+            }
+            else if (!api.IsLoggedIn)
+            {
+                logo.Action += displayLogin;
+            }
+
+            bool displayLogin()
+            {
+                if (!loginDisplayed)
+                {
+                    Scheduler.AddDelayed(() => login?.Show(), 500);
+                    loginDisplayed = true;
+                }
+
+                return true;
             }
         }


Deprecate VoidResult

Deprecate VoidResult

--- Hudl.Mjolnir/Command/VoidResult.cs
+++ Hudl.Mjolnir/Command/VoidResult.cs
@@ -1,5 +1,8 @@
-namespace Hudl.Mjolnir.Command
+using System;
+
+namespace Hudl.Mjolnir.Command
 {
+    [Obsolete("This will likely be removed in a future release.")]
     public class VoidResult
     {
         // TODO rob.hruska 10/18/2013 - Get rid of this void wrapper.


Working back button

Working back button

--- IIUWr/IIUWr/Views/MainView.xaml.cs
+++ IIUWr/IIUWr/Views/MainView.xaml.cs
@@ -71,8 +71,9 @@

         private void BackRequested(object sender, BackRequestedEventArgs e)
         {
+            (DataContext as ViewModels.MainViewModel).SemestersViewModel.SelectedSemester.SelectedCourse = null;
             //TODO Clear selected course instead
-            courseDetails.Visibility = Visibility.Collapsed;
+            //courseDetails.Visibility = Visibility.Collapsed;
             e.Handled = true;
         }


Small change

Small change

--- ITSWebMgmt/Controllers/Computer.cs
+++ ITSWebMgmt/Controllers/Computer.cs
@@ -17,7 +17,7 @@
         public string ComputerName = "ITS\\AAU804396";
         public static Logger logger = LogManager.GetCurrentClassLogger();
         private SCCMcache SCCMcache;
-        public string ConfigPC = "False";
+        public string ConfigPC = "Unknown";
         public string ConfigExtra = "False";
         //TODO getsTestUpdates not used
         public string Domain;


Fix build break in LeapMotionDeviceManager.cs (#10570)

* Update LeapMotionDeviceManager.cs

* Re-add the local LeapXRServiceProvider

* Add a comment about why the local exists

* Formatting and code style

--- Assets/MRTK/Providers/LeapMotion/LeapMotionDeviceManager.cs
+++ Assets/MRTK/Providers/LeapMotion/LeapMotionDeviceManager.cs
@@ -1,12 +1,12 @@
 // Copyright (c) Microsoft Corporation.
-// Licensed under the MIT License.
+// Licensed under the MIT License.

 using Microsoft.MixedReality.Toolkit.Input;
 using Microsoft.MixedReality.Toolkit.Utilities;
-using UnityEngine;
+using System;
 using System.Collections.Generic;
 using Unity.Profiling;
-using System;
+using UnityEngine;

 #if LEAPMOTIONCORE_PRESENT
 using Leap;
@@ -55,27 +55,27 @@

 #if LEAPMOTIONCORE_PRESENT
         /// <summary>
-        /// The profile that contains settings for the Leap Motion Device Manager input data provider.  This profile is nested under
+        /// The profile that contains settings for the Leap Motion Device Manager input data provider.  This profile is nested under
         /// Input > Input Data Providers > Leap Motion Device Manager in the MixedRealityToolkit object in the hierarchy.
         /// </summary>
         public LeapMotionDeviceManagerProfile SettingsProfile => ConfigurationProfile as LeapMotionDeviceManagerProfile;

         /// <summary>
-        /// The LeapServiceProvider is added to the scene at runtime in OnEnable.
+        /// The LeapServiceProvider is added to the scene at runtime in OnEnable.
         /// </summary>
         public LeapServiceProvider LeapMotionServiceProvider { get; protected set; }

         /// <summary>
         /// The distance between the index finger tip and the thumb tip required to enter the pinch/air tap selection gesture.
-        /// The pinch gesture enter will be registered for all values less than the EnterPinchDistance. The default EnterPinchDistance value is 0.02 and must be between 0.015 and 0.1.
-        /// </summary>
-        private float enterPinchDistance => SettingsProfile.EnterPinchDistance;
+        /// The pinch gesture enter will be registered for all values less than the EnterPinchDistance. The default EnterPinchDistance value is 0.02 and must be between 0.015 and 0.1.
+        /// </summary>
+        private float EnterPinchDistance => SettingsProfile.EnterPinchDistance;

         /// <summary>
         /// The distance between the index finger tip and the thumb tip required to exit the pinch/air tap gesture.
-        /// The pinch gesture exit will be registered for all values greater than the ExitPinchDistance. The default ExitPinchDistance value is 0.05 and must be between 0.015 and 0.1.
-        /// </summary>
-        private float exitPinchDistance => SettingsProfile.ExitPinchDistance;
+        /// The pinch gesture exit will be registered for all values greater than the ExitPinchDistance. The default ExitPinchDistance value is 0.05 and must be between 0.015 and 0.1.
+        /// </summary>
+        private float ExitPinchDistance => SettingsProfile.ExitPinchDistance;

         /// <summary>
         /// If true, the leap motion controller is connected and detected.
@@ -90,21 +90,21 @@
         /// <summary>
         /// List of hands that are currently in frame and detected by the leap motion controller. If there are no hands in the current frame, this list will be empty.
         /// </summary>
-        private List<Hand> currentHandsDetectedByLeap => LeapMotionServiceProvider.CurrentFrame.Hands;
+        private List<Hand> CurrentHandsDetectedByLeap => LeapMotionServiceProvider.CurrentFrame.Hands;

         // This value can only be set in the profile, the default is LeapControllerOrientation.Headset.
-        private LeapControllerOrientation leapControllerOrientation => SettingsProfile.LeapControllerOrientation;
+        private LeapControllerOrientation LeapControllerOrientation => SettingsProfile.LeapControllerOrientation;

         /// <summary>
         /// Adds an offset to the game object with LeapServiceProvider attached.  This offset is only applied if the leapControllerOrientation
-        /// is LeapControllerOrientation.Desk and is necessary for the hand to appear in front of the main camera. If the leap controller is on the
-        /// desk, the LeapServiceProvider is added to the scene instead of the LeapXRServiceProvider. The anchor point for the position of the leap hands is
+        /// is LeapControllerOrientation.Desk and is necessary for the hand to appear in front of the main camera. If the leap controller is on the
+        /// desk, the LeapServiceProvider is added to the scene instead of the LeapXRServiceProvider. The anchor point for the position of the leap hands is
         /// the position of the game object with the LeapServiceProvider attached.
         /// </summary>
-        private Vector3 leapHandsOffset => SettingsProfile.LeapControllerOffset;
+        private Vector3 LeapHandsOffset => SettingsProfile.LeapControllerOffset;

         // If the Leap Controller Orientation is the Headset, controller offset settings will be exposed in the inspector while using the LeapXRServiceProvider
-        private LeapVRDeviceOffsetMode leapVRDeviceOffsetMode => SettingsProfile.LeapVRDeviceOffsetMode;
+        private LeapVRDeviceOffsetMode LeapVRDeviceOffsetMode => SettingsProfile.LeapVRDeviceOffsetMode;

         /// <summary>
         /// Dictionary to capture all active leap motion hands detected.
@@ -121,7 +121,7 @@
         {
             base.Enable();

-            if (leapControllerOrientation == LeapControllerOrientation.Headset)
+            if (LeapControllerOrientation == LeapControllerOrientation.Headset)
             {
                 // As of the Unity Plugin (>V5.0.0), the leap service provider needs to know what is the main camera,
                 // it will pick this up from the MainCameraProvider. This needs to be done before the LeapXRServiceProvider is created
@@ -130,26 +130,26 @@
                 MainCameraProvider.mainCamera = CameraCache.Main;
 #endif
                 // If the leap controller is mounted on a headset then add the LeapXRServiceProvider to the scene
-                LeapMotionServiceProvider = CameraCache.Main.gameObject.AddComponent<LeapXRServiceProvider>();
-
+                LeapXRServiceProvider leapXRServiceProvider; // This is a different type than the LeapMotionServiceProvider property for access to specific settings below.
+                LeapMotionServiceProvider = leapXRServiceProvider = CameraCache.Main.gameObject.AddComponent<LeapXRServiceProvider>();
+
                 // Allow modification of VR specific offset modes if the leapControllerOrientation is Headset
                 // These settings mirror the modification of the properties exposed in the inspector within the LeapXRServiceProvider attached
                 // to the main camera
-                if (leapVRDeviceOffsetMode == LeapVRDeviceOffsetMode.ManualHeadOffset)
-                {
-                    // Change the offset mode before setting the properties
+                if (LeapVRDeviceOffsetMode == LeapVRDeviceOffsetMode.ManualHeadOffset)
+                {
+                    // Change the offset mode before setting the properties
                     leapXRServiceProvider.deviceOffsetMode = LeapXRServiceProvider.DeviceOffsetMode.ManualHeadOffset;

                     leapXRServiceProvider.deviceOffsetYAxis = SettingsProfile.LeapVRDeviceOffsetY;
                     leapXRServiceProvider.deviceOffsetZAxis = SettingsProfile.LeapVRDeviceOffsetZ;
                     leapXRServiceProvider.deviceTiltXAxis = SettingsProfile.LeapVRDeviceOffsetTiltX;
                 }
-                else if (leapVRDeviceOffsetMode == LeapVRDeviceOffsetMode.Transform)
+                else if (LeapVRDeviceOffsetMode == LeapVRDeviceOffsetMode.Transform)
                 {
                     if (SettingsProfile.LeapVRDeviceOrigin != null)
                     {
                         leapXRServiceProvider.deviceOffsetMode = LeapXRServiceProvider.DeviceOffsetMode.Transform;
-
                         leapXRServiceProvider.deviceOrigin = SettingsProfile.LeapVRDeviceOrigin;
                     }
                     else
@@ -159,7 +159,7 @@
                 }
             }

-            if (leapControllerOrientation == LeapControllerOrientation.Desk)
+            if (LeapControllerOrientation == LeapControllerOrientation.Desk)
             {
                 // Create a separate gameobject if the leap controller is on the desk
                 GameObject leapProvider = new GameObject("LeapProvider");
@@ -171,7 +171,7 @@
                 leapProvider.transform.parent = CameraCache.Main.transform;

                 // Apply hand position offset, an offset is required to render the hands in view and in front of the camera
-                LeapMotionServiceProvider.transform.position += leapHandsOffset;
+                LeapMotionServiceProvider.transform.position += LeapHandsOffset;
             }

             // Add the attachment hands to the scene for the purpose of getting the tracking state of each hand and joint positions
@@ -208,12 +208,12 @@
                 if (LeapMotionServiceProvider != null)
                 {
                     // Destroy the LeapProvider GameObject if the controller orientation is the desk
-                    if (leapControllerOrientation == LeapControllerOrientation.Desk)
+                    if (LeapControllerOrientation == LeapControllerOrientation.Desk)
                     {
                         GameObject.Destroy(LeapMotionServiceProvider.gameObject);
                     }
                     // Destroy the LeapXRServiceProvider attached to the main camera if the controller orientation is headset
-                    else if (leapControllerOrientation == LeapControllerOrientation.Headset)
+                    else if (LeapControllerOrientation == LeapControllerOrientation.Headset)
                     {
                         GameObject.Destroy(LeapMotionServiceProvider);
                     }
@@ -235,8 +235,8 @@
                 var leapHand = new LeapMotionArticulatedHand(TrackingState.Tracked, handedness, inputSource);

                 // Set pinch thresholds
-                leapHand.HandDefinition.EnterPinchDistance = enterPinchDistance;
-                leapHand.HandDefinition.ExitPinchDistance = exitPinchDistance;
+                leapHand.HandDefinition.EnterPinchDistance = EnterPinchDistance;
+                leapHand.HandDefinition.ExitPinchDistance = ExitPinchDistance;

                 // Set the leap attachment hand to the corresponding handedness
                 if (handedness == Handedness.Left)
@@ -247,7 +247,7 @@
                 {
                     leapHand.SetAttachmentHands(rightAttachmentHand, LeapMotionServiceProvider);
                 }
-
+
                 // Set the pointers for an articulated hand to the leap hand
                 foreach (var pointer in pointers)
                 {
@@ -289,7 +289,7 @@
             if (isLeftTracked && !trackedHands.ContainsKey(Handedness.Left))
             {
                 OnHandDetected(Handedness.Left);
-            }
+            }
             else if (!isLeftTracked && trackedHands.ContainsKey(Handedness.Left))
             {
                 OnHandDetectionLost(Handedness.Left);
@@ -316,7 +316,7 @@
                 if (IsLeapConnected)
                 {
                     // if the number of tracked hands in frame has changed
-                    if (currentHandsDetectedByLeap.Count != trackedHands.Count)
+                    if (CurrentHandsDetectedByLeap.Count != trackedHands.Count)
                     {
                         UpdateLeapTrackedHands(leftAttachmentHand.isTracked, rightAttachmentHand.isTracked);
                     }


Disabled some logging

Disabled some logging

--- Assets/Scripts/ScriptExecutionOrder/ScriptExecutionOrder.cs
+++ Assets/Scripts/ScriptExecutionOrder/ScriptExecutionOrder.cs
@@ -1,4 +1,4 @@
-#define LOG_DEBUG
+//#define LOG_DEBUG
 //#define LOG_DEBUG_VERBOSE

 using UnityEngine;


Don't check for point based gravity unless there is point gravity in use.

--- Aurora/Physics/AuroraOpenDynamicsEngine/AODEPhysicsScene.cs
+++ Aurora/Physics/AuroraOpenDynamicsEngine/AODEPhysicsScene.cs
@@ -2601,7 +2601,7 @@

         private bool normalGravityEnabled = true;
         private Dictionary<int, PointGravity> m_pointGravityPositions = new Dictionary<int, PointGravity> ();
-
+        private bool pointGravityInUse = false;

         public void CalculateGravity (float mass, d.Vector3 position, bool allowNormalGravity, float gravityModifier, ref Vector3 forceVector)
         {
@@ -2612,7 +2612,7 @@
                 forceVector.Y += gravityy * mass * gravityModifier;
                 forceVector.Z += gravityz * mass * gravityModifier;
             }
-            //else
+            if(pointGravityInUse)
             {
                 Vector3 pos = new Vector3((float)position.X, (float)position.Y, (float)position.Z);
                 //Find the nearby centers of gravity
@@ -2682,6 +2682,7 @@
             pointGrav.Position = position;
             pointGrav.PointForce = isApplyingForces;

+            pointGravityInUse = true;
             m_pointGravityPositions[identifier] = pointGrav;
         }


修正 ApplySubmittedValues 方法的拼写

修正 ApplySubmittedValues 方法的拼写

--- Ivony.Html.Forms/FormExtensions.cs
+++ Ivony.Html.Forms/FormExtensions.cs
@@ -45,6 +45,7 @@
       return group.Items.Where( item => item.Selected ).Select( item => item.Value );
     }

+
     /// <summary>
     /// 获取指定控件在客户端设置的值
     /// </summary>
@@ -91,7 +92,7 @@
     /// 将客户端提交来的值，应用到对应的输入控件上
     /// </summary>
     /// <param name="control">表单</param>
-    public static HtmlForm ApplySubmittedValue( this HtmlForm form )
+    public static HtmlForm ApplySubmittedValues( this HtmlForm form )
     {
       if ( form == null )
         throw new ArgumentNullException( "form" );


It works better hiding the banner before destroying it

--- EasyGoogleMobileAds/Scripts/EasyGoogleMobileAdsBehaviour.cs
+++ EasyGoogleMobileAds/Scripts/EasyGoogleMobileAdsBehaviour.cs
@@ -61,6 +61,7 @@

 	private void destroyAd(){
 		if(bannerView!=null){
+			bannerView.Hide();
 			bannerView.Destroy();
 			bannerView = null;
 		}


async invoke

async invoke

--- Examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs
+++ Examples/Titanium.Web.Proxy.Examples.Wpf/MainWindow.xaml.cs
@@ -88,7 +88,7 @@

         private async Task ProxyServer_TunnelConnectRequest(object sender, TunnelConnectSessionEventArgs e)
         {
-            Dispatcher.Invoke(() =>
+            await Dispatcher.InvokeAsync(() =>
             {
                 AddSession(e);
             });
@@ -96,7 +96,7 @@

         private async Task ProxyServer_TunnelConnectResponse(object sender, SessionEventArgs e)
         {
-            Dispatcher.Invoke(() =>
+            await Dispatcher.InvokeAsync(() =>
             {
                 SessionListItem item;
                 if (sessionDictionary.TryGetValue(e, out item))
@@ -113,7 +113,7 @@
         private async Task ProxyServer_BeforeRequest(object sender, SessionEventArgs e)
         {
             SessionListItem item = null;
-            Dispatcher.Invoke(() =>
+            await Dispatcher.InvokeAsync(() =>
             {
                 item = AddSession(e);
             });
@@ -127,7 +127,7 @@
         private async Task ProxyServer_BeforeResponse(object sender, SessionEventArgs e)
         {
             SessionListItem item = null;
-            Dispatcher.Invoke(() =>
+            await Dispatcher.InvokeAsync(() =>
             {
                 SessionListItem item2;
                 if (sessionDictionary.TryGetValue(e, out item2))


Finish port dapper interfaces

Finish port dapper interfaces

--- Flepper.QueryBuilder.DapperExtensions/FlepperDapperQuery.cs
+++ Flepper.QueryBuilder.DapperExtensions/FlepperDapperQuery.cs
@@ -3,6 +3,7 @@
 using System.Data;
 using System.Threading.Tasks;
 using Dapper;
+using static Dapper.SqlMapper;

 namespace Flepper.QueryBuilder.DapperExtensions
 {
@@ -74,5 +75,202 @@
             var queryResult = BuildWithParameters();
             return dbConnection.Query(queryResult.Query, types, map, queryResult.Parameters, transaction, buffered, splitOn, commandTimeout, commandType);
         }
+
+        public IEnumerable<T> Query<T>(IDbTransaction transaction = null, bool buffered = true, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.Query<T>(queryResult.Query, queryResult.Parameters, transaction, buffered, commandTimeout, commandType);
+        }
+
+        public IEnumerable<TReturn> Query<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TReturn> map,
+            IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.Query(queryResult.Query, map, queryResult.Parameters, transaction, buffered, splitOn, commandTimeout, commandType);
+        }
+
+        public IEnumerable<object> Query(Type type, string sql, IDbTransaction transaction = null,
+            bool buffered = true, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.Query(type, queryResult.Query, queryResult.Parameters, transaction, buffered, commandTimeout, commandType);
+        }
+
+        public Task<IEnumerable<dynamic>> QueryAsync(string sql, object param = null, IDbTransaction transaction = null,
+            int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryAsync(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TReturn>(string sql, Func<TFirst, TSecond, TReturn> map,
+            IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryAsync(queryResult.Query, map, queryResult.Parameters, transaction, buffered, splitOn, commandTimeout, commandType);
+        }
+
+        public Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TThird, TReturn>(Func<TFirst, TSecond, TThird, TReturn> map,
+            IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryAsync(queryResult.Query, map, queryResult.Parameters, transaction, buffered, splitOn, commandTimeout, commandType);
+        }
+
+        public Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TThird, TFourth, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TReturn> map,
+            IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryAsync(queryResult.Query, map, queryResult.Parameters, transaction, buffered, splitOn, commandTimeout, commandType);
+        }
+
+        public Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TThird, TFourth, TFifth, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TFifth, TReturn> map,
+            IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryAsync(queryResult.Query, map, queryResult.Parameters, transaction, buffered, splitOn, commandTimeout, commandType);
+        }
+
+        public Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TReturn> map,
+            IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryAsync(queryResult.Query, map, queryResult.Parameters, transaction, buffered, splitOn, commandTimeout, commandType);
+        }
+
+        public Task<IEnumerable<TReturn>> QueryAsync<TReturn>(string sql, Type[] types, Func<object[], TReturn> map, IDbTransaction transaction = null,
+            bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryAsync(queryResult.Query, types, map, queryResult.Parameters, transaction, buffered, splitOn, commandTimeout, commandType);
+        }
+
+        public Task<IEnumerable<object>> QueryAsync(Type type, string sql, object param = null, IDbTransaction transaction = null,
+            int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryAsync(type, queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public Task<IEnumerable<TReturn>> QueryAsync<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TReturn>(Func<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TReturn> map,
+            IDbTransaction transaction = null, bool buffered = true, string splitOn = "Id", int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryAsync(queryResult.Query, map, queryResult.Parameters, transaction, buffered, splitOn, commandTimeout, commandType);
+        }
+
+        public Task<IEnumerable<T>> QueryAsync<T>(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryAsync<T>(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public dynamic QueryFirst(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryFirst(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public object QueryFirst(Type type, IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryFirst(type, queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public T QueryFirst<T>(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryFirst(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public Task<object> QueryFirstAsync(Type type, IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryFirstAsync(type, queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public Task<T> QueryFirstAsync<T>(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryFirstAsync<T>(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public T QueryFirstOrDefault<T>(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryFirstOrDefault<T>(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public object QueryFirstOrDefault(Type type, IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryFirstOrDefault(type, queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public dynamic QueryFirstOrDefault(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryFirstOrDefault(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public Task<object> QueryFirstOrDefaultAsync(Type type, IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryFirstOrDefaultAsync(type, queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public Task<T> QueryFirstOrDefaultAsync<T>(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryFirstOrDefaultAsync<T>(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public GridReader QueryMultiple(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryMultiple(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public Task<GridReader> QueryMultipleAsync(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QueryMultipleAsync(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public dynamic QuerySingle(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QuerySingle(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public object QuerySingle(Type type, IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QuerySingle(type, queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public T QuerySingle<T>(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QuerySingle<T>(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public Task<T> QuerySingleAsync<T>(IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QuerySingleAsync<T>(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public Task<object> QuerySingleAsync(Type type, string sql, object param = null, IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QuerySingleAsync(type, queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
+
+        public T QuerySingleOrDefault<T>(string sql, object param = null, IDbTransaction transaction = null, int? commandTimeout = null, CommandType? commandType = null)
+        {
+            var queryResult = BuildWithParameters();
+            return dbConnection.QuerySingleOrDefault<T>(queryResult.Query, queryResult.Parameters, transaction, commandTimeout, commandType);
+        }
     }
 }


Fix tests

Fix tests

--- InfinniPlatform.SystemConfig/Metadata/MetadataUniqueName.cs
+++ InfinniPlatform.SystemConfig/Metadata/MetadataUniqueName.cs
@@ -34,7 +34,7 @@

         public override int GetHashCode()
         {
-            return ToString().GetHashCode();
+            return ToString().ToLower().GetHashCode();
         }

         public override string ToString()


Code comments

Code comments

--- clr/VetCompassClient/CodingSession.cs
+++ clr/VetCompassClient/CodingSession.cs
@@ -91,7 +91,7 @@
             SessionId = sessionId;
             _sessionAddress = new Uri(_vetcompassAddress + sessionId.ToString() + "/");
             //no call required to web service, but set up a no-op task to continue from
-            _sessionCreationTask = Task.FromResult(0);
+            _sessionCreationTask = Task.FromResult(0); //http://stackoverflow.com/questions/13127177/if-my-interface-must-return-task-what-is-the-best-way-to-have-a-no-operation-imp
         }

         /// <summary>


Implementation of IDisposable for EFRepository

--- NextBirthday/NextBirthday/Models/Repository/EFRepository.cs
+++ NextBirthday/NextBirthday/Models/Repository/EFRepository.cs
@@ -6,7 +6,7 @@

 namespace NextBirthday.Models.Repository
 {
-    public class EFRepository : IRepository
+    public class EFRepository : IRepository, IDisposable
     {
         private birthdatesEntities _entities = new birthdatesEntities();

@@ -24,5 +24,29 @@
         {
             _entities.SaveChanges();
         }
+
+        #region IDisposable
+
+        private bool _disposed = false;
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if(!this._disposed)
+            {
+                if (disposing)
+                {
+                    _entities.Dispose();
+                }
+            }
+            this._disposed = true;
+        }
+
+        public void Dispose()
+        {
+            Dispose(true);
+            GC.SuppressFinalize(this);
+        }
+
+        #endregion
     }
 }


Deleted Snoopy's patch completely, including Thread.Sleep. Preliminary tests indicate that this is what causes deadlock. More tests needed.

--- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -201,7 +201,6 @@
                     if ((int)InventoryType.LSL == item.InvType)
                     {
                         CreateScriptInstance(item, startParam, postOnRez, engine, stateSource);
-                        Thread.Sleep(10); // workaround for Mono cpu utilization > 100% bug
                     }
                 }
             }


Bosun: cache metrics (plans!)

Bosun: cache metrics (plans!)

--- Opserver.Core/Data/Dashboard/Providers/BosunDataProvider.cs
+++ Opserver.Core/Data/Dashboard/Providers/BosunDataProvider.cs
@@ -22,6 +22,7 @@
             get
             {
                 yield return NodeCache;
+                yield return NodeMetricCache;
                 yield return DayCache;
             }
         }
@@ -35,6 +36,16 @@

         private Cache<List<Node>> _nodeCache;
         public Cache<List<Node>> NodeCache => _nodeCache ?? (_nodeCache = ProviderCache(GetAllNodesAsync, 60, 4 * 60 * 60));
+
+
+        private Cache<Dictionary<string, List<string>>> _nodeMetricCache;
+        public Cache<Dictionary<string, List<string>>> NodeMetricCache => _nodeMetricCache ?? (_nodeMetricCache = ProviderCache(
+            async () =>
+            {
+                var response = await GetFromBosunAsync<Dictionary<string, List<string>>>(GetUrl("api/metric/host")).ConfigureAwait(false);
+                return response.Result ?? new Dictionary<string, List<string>>();
+            }, 10 * 60, 4 * 60 * 60));
+

         private string GetUrl(string path)
         {
@@ -461,60 +472,6 @@
                 }

                 return nodes;
-
-                // Nodes
-                //    LastSync,
-                //    Cast(Status as int) Status,
-                //    LastBoot,
-                //    IP_Address as Ip,
-                //    PollInterval as PollIntervalSeconds,
-                //    Cast(vmh.NodeID as varchar(50)) as VMHostID,
-                //    Cast(IsNull(vh.HostID, 0) as Bit) IsVMHost,
-                //    IsNull(UnManaged, 0) as IsUnwatched, // Silence
-
-                // Interfaces
-                //       InterfaceIndex [Index],
-                //       LastSync,
-                //       Comments,
-                //       InterfaceAlias Alias,
-                //       IfName,
-                //       InterfaceTypeDescription TypeDescription,
-                //       IsNull(UnManaged, 0) as IsUnwatched,
-                //       UnManageFrom as UnwatchedFrom,
-                //       UnManageUntil as UnwatchedUntil,
-                //       Cast(Status as int) Status,
-                //       InPps,
-                //       OutPps,
-                //       InterfaceMTU as MTU,
-                //       InterfaceSpeed as Speed
-
-                // Volumes
-                //       LastSync,
-                //       VolumeIndex as [Index],
-                //       VolumeDescription as [Description],
-                //       VolumeType as Type,
-
-                // Applications
-                //Select Cast(com.ApplicationID as varchar(50)) as Id,
-                //       Cast(NodeID as varchar(50)) as NodeId,
-                //       app.Name as AppName,
-                //       IsNull(app.Unmanaged, 0) as IsUnwatched,
-                //       app.UnManageFrom as UnwatchedFrom,
-                //       app.UnManageUntil as UnwatchedUntil,
-                //       com.Name as ComponentName,
-                //       ccs.TimeStamp as LastUpdated,
-                //       pe.PID as ProcessID,
-                //       ccs.ProcessName,
-                //       ccs.LastTimeUp,
-                //       ccs.PercentCPU as CurrentPercentCPU,
-                //       ccs.PercentMemory as CurrentPercentMemory,
-                //       ccs.MemoryUsed as CurrentMemoryUsed,
-                //       ccs.VirtualMemoryUsed as CurrentVirtualMemoryUsed,
-                //       pe.AvgPercentCPU as PercentCPU,
-                //       pe.AvgPercentMemory as PercentMemory,
-                //       pe.AvgMemoryUsed as MemoryUsed,
-                //       pe.AvgVirtualMemoryUsed as VirtualMemoryUsed,
-                //       pe.ErrorMessage
             }
         }


added more progress reporting for database updater

--- RelhaxModpack/RelhaxModpack/Windows/DatabaseUpdater.xaml.cs
+++ RelhaxModpack/RelhaxModpack/Windows/DatabaseUpdater.xaml.cs
@@ -851,6 +851,7 @@
             LastSupportedTanksVersion = string.Empty;
             SetProgress(10);

+            ReportProgress("Loading Root database 1.1 document");
             //load root document
             XmlDocument rootDocument = XmlUtils.LoadXmlDocument(SelectModInfo.FileName, XmlLoadType.FromFile);
             if(rootDocument == null)
@@ -860,8 +861,9 @@
                 return;
             }

+            ReportProgress("Parsing database 1.1 document");
             //parse main database
-            if(!XmlUtils.ParseDatabase1V1FromFiles(Path.GetDirectoryName(SelectModInfo.FileName), rootDocument,
+            if (!XmlUtils.ParseDatabase1V1FromFiles(Path.GetDirectoryName(SelectModInfo.FileName), rootDocument,
                 globalDependencies, dependencies, parsedCategoryList))
             {
                 ReportProgress("Failed to parse database");