Fixed song time on songs shorter than 1 minute

--- src/NadekoBot/Services/Music/MusicService.cs
+++ src/NadekoBot/Services/Music/MusicService.cs
@@ -341,7 +341,7 @@
                     return null;
                 }
                 TimeSpan time;
-                if (!TimeSpan.TryParseExact(data[4], new[] { "m\\:ss", "mm\\:ss", "h\\:mm\\:ss", "hh\\:mm\\:ss", "hhh\\:mm\\:ss" }, CultureInfo.InvariantCulture, out time))
+                if (!TimeSpan.TryParseExact(data[4], new[] { "ss", "m\\:ss", "mm\\:ss", "h\\:mm\\:ss", "hh\\:mm\\:ss", "hhh\\:mm\\:ss" }, CultureInfo.InvariantCulture, out time))
                     time = TimeSpan.FromHours(24);

                 return new SongInfo()


Test fixups

Test fixups

--- src/Nancy.Tests/Unit/Routing/RouteFixture.cs
+++ src/Nancy.Tests/Unit/Routing/RouteFixture.cs
@@ -1,6 +1,8 @@
 namespace Nancy.Tests.Unit.Routing
 {
     using System;
+    using System.Threading;
+
     using Fakes;
     using Nancy.Routing;
     using Xunit;
@@ -12,7 +14,7 @@
         {
             //Given, When
             var exception =
-                Record.Exception(() => new Route(null, "", null, x => null));
+                Record.Exception(() => new Route(null, "", null, (x, c) => null));

             // Then
             exception.ShouldBeOfType<ArgumentException>();
@@ -23,7 +25,7 @@
         {
             //Given, When
             var exception =
-                Record.Exception(() => new Route("", "/", null, x => null));
+                Record.Exception(() => new Route("", "/", null, (x,c) => null));

             // Then
             exception.ShouldBeOfType<ArgumentException>();
@@ -34,7 +36,7 @@
         {
             //Given, When
             var exception =
-                Record.Exception(() => new Route("GET", null, null, x => null));
+                Record.Exception(() => new Route("GET", null, null, (x, c) => null));

             // Then
             exception.ShouldBeOfType<ArgumentException>();
@@ -45,7 +47,7 @@
         {
             //Given, When
             var exception =
-                Record.Exception(() => new Route("GET", null, null, x => null));
+                Record.Exception(() => new Route("GET", null, null, (x, c) => null));

             // Then
             exception.ShouldBeOfType<ArgumentException>();
@@ -68,7 +70,8 @@
             //Given
             DynamicDictionary capturedParameters = null;

-            Func<dynamic, Response> action = x => {
+            Func<dynamic, Response> action = x =>
+            {
                 capturedParameters = x;
                 return null;
             };
@@ -77,10 +80,10 @@
             parameters.foo = 10;
             parameters.bar = "value";

-            var route = new Route("GET", "/", null, action);
+            var route = Route.FromSync("GET", "/", null, action);

             // When
-            route.Invoke(parameters);
+            route.Invoke(parameters, new CancellationToken());

             // Then
             capturedParameters.ShouldBeSameAs((object)parameters);
@@ -93,10 +96,10 @@
             var expectedResponse = new Response();
             Func<object, Response> action = x => expectedResponse;

-            var route = new Route("GET", "/", null, action);
+            var route = Route.FromSync("GET", "/", null, action);

             // When
-            var response = (Response)route.Invoke(new DynamicDictionary());
+            var response = (Response)route.Invoke(new DynamicDictionary(), new CancellationToken()).Result;

             // Then
             response.ShouldBeSameAs(expectedResponse);


Missing line from previous commit

Missing line from previous commit

--- src/OpenSage.Game/Logic/Object/GameObject.cs
+++ src/OpenSage.Game/Logic/Object/GameObject.cs
@@ -369,7 +369,6 @@

                     AddBehavior(behaviorDataContainer.Tag, module);
                 }
-                }
             }

             _behaviorModules = behaviors;


Moved result storing to PDOStatement constructor, fixes

--- src/PDO/Peachpie.Library.PDO/PDOStatement.cs
+++ src/PDO/Peachpie.Library.PDO/PDOStatement.cs
@@ -69,6 +69,14 @@
         /// <param name="driver_options">The driver options.</param>
         internal PDOStatement(Context ctx, PDO pdo, string statement, PhpArray driver_options)
         {
+            if (pdo.HasExecutedQuery)
+            {
+                if (!pdo.StoreLastExecutedQuery())
+                {
+                    pdo.HandleError(new PDOException("Last executed PDOStatement result set could not be saved correctly."));
+                }
+            }
+
             this.m_pdo = pdo;
             this._ctx = ctx;
             this.m_stmt = statement;
@@ -125,7 +133,8 @@
                 storedResultPosition = 0;
             } else
             {
-                m_pdo.HandleError(new PDOException("There are no rows to store."));
+                //
+                //m_pdo.HandleError(new PDOException("There are no rows to store."));
                 return false;
             }

@@ -635,14 +644,6 @@
         /// <inheritDoc />
         public bool execute(PhpArray input_parameters = null)
         {
-            if(m_pdo.HasExecutedQuery)
-            {
-                if(!m_pdo.StoreLastExecutedQuery())
-                {
-                    m_pdo.HandleError(new PDOException("Last executed PDOStatement result set could not be saved correctly."));
-                }
-            }
-
             // Sets PDO executed flag
             m_pdo.HasExecutedQuery = true;


Fixed issue where the CSS was only loaded in a Development environment.

--- src/PersonalSite/Views/Shared/_Layout.cshtml
+++ src/PersonalSite/Views/Shared/_Layout.cshtml
@@ -5,7 +5,6 @@
 <head>
     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
     <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,600" type="text/css">
-    <environment names="Development">
     <link rel="stylesheet" href="~/css/Site.css" type="text/css" media="screen">
     <link rel="apple-touch-icon" sizes="57x57" href="~/img/apple-touch-icon-57x57.png">
     <link rel="apple-touch-icon" sizes="114x114" href="~/img/apple-touch-icon-114x114.png">
@@ -20,7 +19,6 @@
     <link rel="icon" type="image/png" href="~/img/favicon-96x96.png" sizes="96x96">
     <link rel="icon" type="image/png" href="~/img/favicon-16x16.png" sizes="16x16">
     <link rel="icon" type="image/png" href="~/img/favicon-32x32.png" sizes="32x32">
-    </environment>
     <meta name=" application-name" content="Brent Newbury's Website">
     <meta name="msapplication-config" content="~/browserconfig.xml">
     <meta name="msapplication-TileColor" content="#1c8bbf">


Fix RestClient for SL, WP from previous commit

--- RestSharp/IRestClient.cs
+++ RestSharp/IRestClient.cs
@@ -112,9 +112,11 @@
 	    /// <param name="httpMethod">The HTTP method to execute</param>
 	    RestRequestAsyncHandle ExecuteAsyncPost<T>(IRestRequest request, Action<IRestResponse<T>, RestRequestAsyncHandle> callback, string httpMethod);

+#if FRAMEWORK
 	    IRestResponse ExecuteAsGet(IRestRequest request, string httpMethod);
 	    IRestResponse ExecuteAsPost(IRestRequest request, string httpMethod);
 	    IRestResponse<T> ExecuteAsGet<T>(IRestRequest request, string httpMethod) where T : new();
 	    IRestResponse<T> ExecuteAsPost<T>(IRestRequest request, string httpMethod) where T : new();
+#endif
 	}
 }


Update Event Source Name

Update Event Source Name

--- ServiceRegistry.cs
+++ ServiceRegistry.cs
@@ -482,7 +482,7 @@
             }
         }

-        [EventSource(Name = "DaylightServiceRegistry")]
+        [EventSource(Name = "ServiceRegistry")]
         private sealed class ServiceRegistryEventSource : EventSource
         {
             [Event(5, Message = "Cannot find a binding for requested abstract type '{0}'.", Level = EventLevel.Warning)]
@@ -528,4 +528,4 @@
             }
         }
     }
-}+}


72489, avoid develop changes, prepare private

--- SolutionVersion.cs
+++ SolutionVersion.cs
@@ -28,9 +28,9 @@
 [assembly: AssemblyCopyright("© 2018 Gigya Inc.")]
 [assembly: AssemblyDescription("Microdot Framework")]

-[assembly: AssemblyVersion("1.11.3.0")]
-[assembly: AssemblyFileVersion("1.11.3.0")]
-[assembly: AssemblyInformationalVersion("1.11.3.0")]
+[assembly: AssemblyVersion("1.11.33.0")]
+[assembly: AssemblyFileVersion("1.11.33.0")]
+[assembly: AssemblyInformationalVersion("1.11.33.0")]

 // Setting ComVisible to false makes the types in this assembly not visible


Fixed misleading parameter to match name and description in implementing class.

--- src/Q42.HueApi/Interfaces/ILocalHueClient.cs
+++ src/Q42.HueApi/Interfaces/ILocalHueClient.cs
@@ -14,14 +14,14 @@
   public interface ILocalHueClient : IHueClient
   {
 	/// <summary>
-	/// Register your <paramref name="appName"/> and <paramref name="appKey"/> at the Hue Bridge.
+	/// Register your <paramref name="appName"/> and <paramref name="deviceName"/> at the Hue Bridge.
 	/// </summary>
-	/// <param name="appKey">Secret key for your app. Must be at least 10 characters.</param>
-	/// <param name="appName">The name of your app or device.</param>
+	/// <param name="deviceName">The name of the device.</param>
+	/// <param name="appName">The name of your app.</param>
 	/// <returns><c>true</c> if success, <c>false</c> if the link button hasn't been pressed.</returns>
-	/// <exception cref="ArgumentNullException"><paramref name="appName"/> or <paramref name="appKey"/> is <c>null</c>.</exception>
-	/// <exception cref="ArgumentException"><paramref name="appName"/> or <paramref name="appKey"/> aren't long enough, are empty or contains spaces.</exception>
-	Task<string> RegisterAsync(string appName, string appKey);
+	/// <exception cref="ArgumentNullException"><paramref name="appName"/> or <paramref name="deviceName"/> is <c>null</c>.</exception>
+	/// <exception cref="ArgumentException"><paramref name="appName"/> or <paramref name="deviceName"/> aren't long enough, are empty or contains spaces.</exception>
+	Task<string> RegisterAsync(string appName, string deviceName);

 		/// <summary>
 		/// Initialize the client with your app key


Added "Ignore User" system to posts -- thanks to "jshepler" for the code.

--- yafsrc/YAF.Classes/YAF.Classes.Data/DB.cs
+++ yafsrc/YAF.Classes/YAF.Classes.Data/DB.cs
@@ -361,7 +361,7 @@
 		}
 		#endregion

-		#region yaf_AccessMask
+		#region AccessMask
 		/// <summary>
 		/// Gets a list of access mask properities
 		/// </summary>
@@ -445,7 +445,7 @@
 		}
 		#endregion

-		#region yaf_Active
+		#region Active
 		/// <summary>
 		/// Gets list of active users
 		/// </summary>
@@ -511,7 +511,7 @@
 		}
 		#endregion

-		#region yaf_Attachment
+		#region Attachment
 		/// <summary>
 		/// Gets a list of attachments
 		/// </summary>
@@ -610,7 +610,7 @@
 		}
 		#endregion

-		#region yaf_BannedIP
+		#region BannedIP
 		/// <summary>
 		/// List of Baned IP's
 		/// </summary>
@@ -659,7 +659,7 @@
 		}
 		#endregion

-		#region yaf_Board
+		#region Board
 		/// <summary>
 		/// Gets a list of information about a board
 		/// </summary>
@@ -787,7 +787,7 @@
 		}
 		#endregion

-		#region yaf_Category
+		#region Category
 		/// <summary>
 		/// Deletes a category
 		/// </summary>
@@ -874,7 +874,7 @@
 		}
 		#endregion

-		#region yaf_CheckEmail
+		#region CheckEmail
 		/// <summary>
 		/// Saves a new email into the table for verification
 		/// </summary>
@@ -923,7 +923,7 @@

 		#endregion

-		#region yaf_Choice
+		#region Choice
 		/// <summary>
 		/// Saves a vote in the database
 		/// </summary>
@@ -941,7 +941,7 @@
 		}
 		#endregion

-		#region yaf_EventLog
+		#region EventLog
 		static public void eventlog_create( object userID, object source, object description, object type )
 		{
 			try
@@ -1010,10 +1010,9 @@
 				return DBAccess.GetData( cmd );
 			}
 		}
-		#endregion yaf_EventLog
-
-		// Admin control of file extensions - MJ Hufford
-		#region yaf_Extensions
+		#endregion EventLog
+
+		#region Extensions

 		static public void extension_delete( object extensionId )
 		{
@@ -1089,9 +1088,9 @@
 				// Ignore any errors in this method
 			}
 		}
-		#endregion yaf_EventLog
-
-		#region yaf_PollVote
+		#endregion EventLog
+
+		#region PollVote
 		/// <summary>
 		/// Checks for a vote in the database
 		/// </summary>
@@ -1109,7 +1108,7 @@
 		}
 		#endregion

-		#region yaf_Forum
+		#region Forum
 		//ABOT NEW 16.04.04
 		/// <summary>
 		/// Deletes attachments out of a entire forum
@@ -1542,7 +1541,7 @@

 		#endregion

-		#region yaf_ForumAccess
+		#region ForumAccess
 		static public DataTable forumaccess_list( object forumID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "forumaccess_list" ) )
@@ -1574,7 +1573,7 @@
 		}
 		#endregion

-		#region yaf_Group
+		#region Group
 		static public DataTable group_list( object boardID, object groupID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "group_list" ) )
@@ -1622,7 +1621,7 @@
 		}
 		#endregion

-		#region yaf_Mail
+		#region Mail
 		static public void mail_delete( object mailID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "mail_delete" ) )
@@ -1673,7 +1672,7 @@
 		}
 		#endregion

-		#region yaf_Message
+		#region Message

 		static public DataTable post_list( object topicID, object updateViewCount, bool showDeleted )
 		{
@@ -2076,7 +2075,7 @@

 		#endregion

-		#region yaf_Medal
+		#region Medal

 		/// <summary>
 		/// Lists given medal.
@@ -2401,7 +2400,7 @@

 		#endregion

-		#region yaf_NntpForum
+		#region NntpForum
 		static public DataTable nntpforum_list( object boardID, object minutes, object nntpForumID, object active )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "nntpforum_list" ) )
@@ -2449,7 +2448,7 @@
 		}
 		#endregion

-		#region yaf_NntpServer
+		#region NntpServer
 		static public DataTable nntpserver_list( object boardID, object nntpServerID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "nntpserver_list" ) )
@@ -2486,7 +2485,7 @@
 		}
 		#endregion

-		#region yaf_NntpTopic
+		#region NntpTopic
 		static public DataTable nntptopic_list( object thread )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "nntptopic_list" ) )
@@ -2514,7 +2513,7 @@
 		}
 		#endregion

-		#region yaf_PMessage
+		#region PMessage
 		/// <summary>
 		/// Returns a list of private messages based on the arguments specified.
 		/// If pMessageID != null, returns the PM of id pMessageId.
@@ -2632,7 +2631,7 @@
 		}
 		#endregion

-		#region yaf_Poll
+		#region Poll
 		static public DataTable poll_stats( object pollID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "poll_stats" ) )
@@ -2714,7 +2713,7 @@

 		#endregion

-		#region yaf_Rank
+		#region Rank
 		static public DataTable rank_list( object boardID, object rankID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "rank_list" ) )
@@ -2751,7 +2750,7 @@
 		}
 		#endregion

-		#region yaf_Smiley
+		#region Smiley
 		static public DataTable smiley_list( object boardID, object smileyID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "smiley_list" ) )
@@ -2808,7 +2807,7 @@
 		}
 		#endregion

-		#region yaf_BBCode
+		#region BBCode
 		static public DataTable bbcode_list( object boardID, object bbcodeID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "bbcode_list" ) )
@@ -2852,7 +2851,7 @@
 		}
 		#endregion

-		#region yaf_Registry
+		#region Registry
 		/// <summary>
 		/// Retrieves entries in the board settings registry
 		/// </summary>
@@ -2919,7 +2918,7 @@
 		}
 		#endregion

-		#region yaf_System
+		#region System
 		/// <summary>
 		/// Not in use anymore. Only required for old database versions.
 		/// </summary>
@@ -2934,7 +2933,7 @@
 		}
 		#endregion

-		#region yaf_Topic
+		#region Topic
 		static public void topic_poll_update(object topicID, object messageID, object pollID)
 		{
 			using (SqlCommand cmd = DBAccess.GetCommand("topic_poll_update"))
@@ -3136,7 +3135,7 @@
 		}
 		#endregion

-		#region yaf_ReplaceWords
+		#region ReplaceWords
 		// rico : replace words / begin
 		/// <summary>
 		/// Gets a list of replace words
@@ -3185,7 +3184,49 @@
 		}
 		#endregion

-		#region yaf_User
+		#region IgnoreUser
+
+		static public void user_addignoreduser( object userId, object ignoredUserId )
+		{
+			using ( SqlCommand cmd = DBAccess.GetCommand( "user_addignoreduser" ) )
+			{
+				cmd.CommandType = CommandType.StoredProcedure;
+				cmd.Parameters.AddWithValue( "UserId", userId );
+				cmd.Parameters.AddWithValue( "IgnoredUserId", ignoredUserId );
+				DBAccess.ExecuteNonQuery( cmd );
+			}
+		}
+
+		static public void user_removeignoreduser( object userId, object ignoredUserId )
+		{
+			using ( SqlCommand cmd = DBAccess.GetCommand( "user_removeignoreduser" ) )
+			{
+				cmd.CommandType = CommandType.StoredProcedure;
+				cmd.Parameters.AddWithValue( "UserId", userId );
+				cmd.Parameters.AddWithValue( "IgnoredUserId", ignoredUserId );
+				DBAccess.ExecuteNonQuery( cmd );
+			}
+		}
+
+		static public bool user_isuserignored( object userId, object ignoredUserId )
+		{
+			using ( SqlCommand cmd = DBAccess.GetCommand( "user_isuserignored" ) )
+			{
+				cmd.CommandType = CommandType.StoredProcedure;
+				cmd.Parameters.AddWithValue( "UserId", userId );
+				cmd.Parameters.AddWithValue( "IgnoredUserId", ignoredUserId );
+				cmd.Parameters.Add( "result", SqlDbType.Bit );
+				cmd.Parameters["result"].Direction = ParameterDirection.ReturnValue;
+
+				DBAccess.ExecuteNonQuery( cmd );
+
+				return Convert.ToBoolean( cmd.Parameters["result"].Value );
+			}
+		}
+
+		#endregion
+
+		#region User
 		static public DataTable user_list( object boardID, object userID, object approved )
 		{
 			return user_list( boardID, userID, approved, null, null );
@@ -3701,7 +3742,7 @@
 		}
 		#endregion

-		#region yaf_UserForum
+		#region UserForum
 		static public DataTable userforum_list( object userID, object forumID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "userforum_list" ) )
@@ -3735,7 +3776,7 @@
 		}
 		#endregion

-		#region yaf_UserGroup
+		#region UserGroup
 		static public DataTable usergroup_list( object userID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "usergroup_list" ) )
@@ -3758,7 +3799,7 @@
 		}
 		#endregion

-		#region yaf_WatchForum
+		#region WatchForum
 		static public void watchforum_add( object userID, object forumID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "watchforum_add" ) )
@@ -3799,7 +3840,7 @@
 		}
 		#endregion

-		#region yaf_WatchTopic
+		#region WatchTopic
 		static public DataTable watchtopic_list( object userID )
 		{
 			using ( SqlCommand cmd = DBAccess.GetCommand( "watchtopic_list" ) )
@@ -3841,8 +3882,8 @@
 		#endregion

 		#region vzrus addons
-                #region reindex page controls
-        public static string btnGetStatsName
+		#region reindex page controls
+		public static string btnGetStatsName
         {
             get
             {


arg checking

arg checking

--- src/SetStartupProjects/StartProjectFinder.cs
+++ src/SetStartupProjects/StartProjectFinder.cs
@@ -60,6 +60,7 @@

         protected internal bool ShouldIncludeProjectFile(Project project)
         {
+            Guard.AgainstNonExistingFile(project.Path, "Project");
             if (ShouldIncludeForFileExtension(Path.GetExtension(project.Path)))
             {
                 return true;


fixed the building error

fixed the building error

--- src/SuperSocket.Server/SuperSocketService.cs
+++ src/SuperSocket.Server/SuperSocketService.cs
@@ -168,9 +168,9 @@

             if (packageHandler != null)
             {
-                if (session.Channel is IChannel<TReceivePackageInfo> channel)
-                {
-                    channel.PackageReceived += async (ch, p) =>
+                if (session.Channel is IChannel<TReceivePackageInfo> packegedChannel)
+                {
+                    packegedChannel.PackageReceived += async (ch, p) =>
                     {
                         try
                         {


Fix mixed properties (wip)

Fix mixed properties (wip)

--- src/Umbraco.Web/Editors/ContentController.cs
+++ src/Umbraco.Web/Editors/ContentController.cs
@@ -1039,10 +1039,12 @@
                 }
             }

-            base.MapPropertyValues<IContent, ContentItemSave>(
+            bool Varies(Property property) => property.PropertyType.Variations.Has(ContentVariation.CultureNeutral);
+
+            MapPropertyValues<IContent, ContentItemSave>(
                 contentItem,
-                (save, property) => property.GetValue(save.Culture),         //get prop val
-                (save, property, v) => property.SetValue(v, save.Culture));  //set prop val
+                (save, property) => Varies(property) ? property.GetValue(save.Culture) : property.GetValue(),         //get prop val
+                (save, property, v) => { if (Varies(property)) property.SetValue(v, save.Culture); else property.SetValue(v); });  //set prop val
         }

         /// <summary>


Fix "Item already exists in dictionary" when selecting items in the list view

--- src/Umbraco.Web/Editors/ContentController.cs
+++ src/Umbraco.Web/Editors/ContentController.cs
@@ -431,9 +431,20 @@
         [HttpPost]
         public Dictionary<int, string[]> GetPermissions(int[] nodeIds)
         {
-            return Services.UserService
-                    .GetPermissions(Security.CurrentUser, nodeIds)
-                    .ToDictionary(x => x.EntityId, x => x.AssignedPermissions);
+            var permissions = Services.UserService
+                    .GetPermissions(Security.CurrentUser, nodeIds);
+
+            var permissionsDictionary = new Dictionary<int, string[]>();
+            foreach (var nodeId in nodeIds)
+            {
+                var aggregatePerms = permissions
+                                        .Where(x => x.EntityId == nodeId)
+                                        .SelectMany(x => x.AssignedPermissions)
+                                        .Distinct().ToArray();
+                permissionsDictionary.Add(nodeId, aggregatePerms);
+            }
+
+            return permissionsDictionary;
         }

         /// <summary>


Changed Environment Result Format

Changed Environment Result Format

--- src/Zeus/Commands/MachineStatus/EnvResult.cs
+++ src/Zeus/Commands/MachineStatus/EnvResult.cs
@@ -7,17 +7,11 @@
         public EnvResult(EnvInfo env)
         {
             OS = env.OSName;
-            Time = env.Time.Time;
-            TimeZone = env.Time.TimeZone;
-            UtcOffset = env.Time.UtcOffset;
+            TimeInfo = env.Time;
         }

         public string OS { get; set; }

-        public string Time { get; set; }
-
-        public string TimeZone { get; set; }
-
-        public string UtcOffset { get; set; }
+        public EnvTimeInfo TimeInfo { get; set; }
     }
 }


- Issue #160: Compatibility with old script syntax

--- Source/csparser.cs
+++ Source/csparser.cs
@@ -247,7 +247,7 @@
                 {
                     //e.g. resolve ..\subdir\*.cs into multiple concrete imports
                     string statementToParse = statement.Replace("($this.name)", Path.GetFileNameWithoutExtension(parentScript));
-                    statementToParse = statementToParse.Replace("\t", "").Trim();
+                    statementToParse = statementToParse.Replace("\t", "").Trim().Trim('"');

                     string[] parts = CSharpParser.SplitByDelimiter(statementToParse, DirectiveDelimiters);


AutoUpdate: "Notify me of updates" observed

--- ZD.Gui/MainForm.cs
+++ ZD.Gui/MainForm.cs
@@ -81,10 +81,12 @@
         }

         /// <summary>
-        /// Shows welcome screen in form informing user about an available update.
+        /// <para>Shows welcome screen in form informing user about an available update.</para>
+        /// <para>Has no effect if user settings say no update notifications.</para>
         /// </summary>
         public void SetWelcomeUpdate(int vmaj, int vmin, DateTime rdate, string rnotes)
         {
+            if (!AppSettings.NotifyOfUpdates) return;
             lc.SetWelcomeUpdate(vmaj, vmin, rdate, rnotes, updateNow);
         }


Make SetDefault accessibility consistent with other methods

Co-Authored-By: Dan Balasescu <c9bd76907373126dff70d71f8b944159a669cbf1@smgi.me>

--- osu.Framework/Bindables/Bindable.cs
+++ osu.Framework/Bindables/Bindable.cs
@@ -122,7 +122,7 @@
             }
         }

-        protected void SetDefault(T previousValue, T value, bool bypassChecks = false, Bindable<T> source = null)
+        internal void SetDefault(T previousValue, T value, bool bypassChecks = false, Bindable<T> source = null)
         {
             defaultValue = value;
             TriggerDefaultChange(previousValue, source ?? this, true, bypassChecks);


Don't consider slider tails in timing distribution

--- osu.Game.Rulesets.Osu/OsuRuleset.cs
+++ osu.Game.Rulesets.Osu/OsuRuleset.cs
@@ -198,7 +198,7 @@
             {
                 Columns = new[]
                 {
-                    new StatisticItem("Timing Distribution", new HitEventTimingDistributionGraph(score.HitEvents.Where(e => e.HitObject is HitCircle).ToList())
+                    new StatisticItem("Timing Distribution", new HitEventTimingDistributionGraph(score.HitEvents.Where(e => e.HitObject is HitCircle && !(e.HitObject is SliderTailCircle)).ToList())
                     {
                         RelativeSizeAxes = Axes.X,
                         Height = 130


Fix/add some xmldoc

Fix/add some xmldoc

--- osu.Game/Beatmaps/BeatmapManager.cs
+++ osu.Game/Beatmaps/BeatmapManager.cs
@@ -503,6 +503,9 @@
         /// <returns>Results from the provided query.</returns>
         public IEnumerable<BeatmapInfo> QueryBeatmaps(Expression<Func<BeatmapInfo, bool>> query) => beatmaps.Beatmaps.AsNoTracking().Where(query);

+        /// <summary>
+        /// Import a <see cref="BeatmapSetInfo"/> into the beatmap store.
+        /// </summary>
         private void import(BeatmapSetInfo beatmapSet, OsuDbContext context) => getBeatmapStoreWithContext(context).Add(beatmapSet);

         /// <summary>
@@ -530,10 +533,8 @@
         }

         /// <summary>
-        ///
-        /// </summary>
-        /// <param name="reader"></param>
-        /// <returns></returns>
+        /// Create a <see cref="BeatmapSetInfo"/> from a provided archive.
+        /// </summary>
         private BeatmapSetInfo createBeatmapSetInfo(ArchiveReader reader)
         {
             // let's make sure there are actually .osu files to import.
@@ -553,6 +554,9 @@
             };
         }

+        /// <summary>
+        /// Create all required <see cref="FileInfo"/>s for the provided archive, adding them to the global file store.
+        /// </summary>
         private List<BeatmapSetFileInfo> createFileInfos(ArchiveReader reader, FileStore files)
         {
             List<BeatmapSetFileInfo> fileInfos = new List<BeatmapSetFileInfo>();


Add new State - IsLoaded

Add new State - IsLoaded

--- Runtime/Core/SceneSub.cs
+++ Runtime/Core/SceneSub.cs
@@ -12,8 +12,9 @@
     {
         enum State
         {
+            InvalidScene,
             AlreadyAdded,
-            InvalidScene,
+            IsLoaded,
             NotAdded
         }

@@ -24,7 +25,9 @@
         static State CheckSceneState(string sceneName)
         {
             if (String.IsNullOrEmpty(sceneName)) return State.InvalidScene;
-            if (SceneManager.GetSceneByName(sceneName).isLoaded) { return State.AlreadyAdded; }
+            if (SceneManager.GetSceneByName(sceneName).isLoaded) return State.IsLoaded;
+            var scn = SceneManager.GetSceneByName(sceneName);
+            if (scn.name != default) { return State.AlreadyAdded; }
             else { return State.NotAdded; }
         }

@@ -39,7 +42,7 @@
         {
             var name = System.IO.Path.GetFileNameWithoutExtension(sceneName);
             var state = CheckSceneState(name);
-            if (state == State.InvalidScene || state == State.AlreadyAdded) return;
+            if (state != State.NotAdded) return;

             var layerIndex = GetLayerIndex(name);
             LayerKernel.Initialized[layerIndex] = false;
@@ -57,7 +60,7 @@
         {
             var name = System.IO.Path.GetFileNameWithoutExtension(sceneName);
             var state = CheckSceneState(name);
-            if (state == State.InvalidScene || state == State.NotAdded) return;
+            if (state == State.InvalidScene || state != State.IsLoaded) return;
             RemoveOp(name);
         }


Remove unneeded code

Remove unneeded code

--- edX/Module7/Program.cs
+++ edX/Module7/Program.cs
@@ -3,6 +3,7 @@
 using System.Collections.Generic;
 using System.Collections.ObjectModel;
 using System.Linq;
+using System.Net;

 namespace Module7
 {
@@ -52,7 +53,7 @@

 		public abstract class ANameable : INameable
 		{
-			public string Name { get; private set; }
+			public string Name { get; protected set; }

 			protected ANameable(string name)
 			{
@@ -65,17 +66,16 @@
 			}
 		}

-		public abstract class APerson : INameable
-		{
-			public string Name { get; private set; }
+		public abstract class APerson : ANameable
+		{
 			public string FirstName { get; protected set; }
 			public string LastName { get; protected set; }
 			public DateTime Birthdate { get; set; }
 			public abstract SchoolStatus SchoolStatus { get; }

 			protected APerson(string firstName, string lastName, DateTime birthdate)
-			{
-				Name = firstName + " " + lastName;
+				: base(firstName + " " + lastName)
+			{
 				FirstName = firstName;
 				LastName = lastName;
 				Birthdate = birthdate;
@@ -190,11 +190,6 @@
 			public void TakeTest()
 			{
 				Console.WriteLine("Student takes the test.");
-			}
-
-			public override string ToString()
-			{
-				return Name;
 			}
 		}


Updated names of test cases

Updated names of test cases

--- tests/NLog.UnitTests/TimeSourceTests.cs
+++ tests/NLog.UnitTests/TimeSourceTests.cs
@@ -57,25 +57,25 @@
         }

         [Test]
-        public void NowTest()
+        public void AccurateLocalTest()
         {
             TestTimeSource(new AccurateLocalTimeSource(), DateTime.Now, DateTimeKind.Local);
         }

         [Test]
-        public void UtcNowTest()
+        public void AccurateUtcTest()
         {
             TestTimeSource(new AccurateUtcTimeSource(), DateTime.UtcNow, DateTimeKind.Utc);
         }

         [Test]
-        public void CachedNowTest()
+        public void FastLocalTest()
         {
             TestTimeSource(new FastLocalTimeSource(), DateTime.Now, DateTimeKind.Local);
         }

         [Test]
-        public void CachedUtcNowTest()
+        public void FastUtcTest()
         {
             TestTimeSource(new FastUtcTimeSource(), DateTime.UtcNow, DateTimeKind.Utc);
         }


More Unity 5 bug fixes.

More Unity 5 bug fixes.

--- Scene/SunlightManager.cs
+++ Scene/SunlightManager.cs
@@ -5,40 +5,66 @@

 public class SunlightManager : CacheBehaviour {

-	private GameObject player;
+	private float fadeAfter = 0f;
+	private float timeToFade = 1f;
 	private PlayerState playerState;
-	private float groundLine;				// coordinates on TileMap where above ground and below ground meet
-	private float aboveGround = 1.45f;		// light intensity when player is above ground
-	private float belowGround = .9f;		// light intensity when player is below ground
+	private Light playerLight;
+	private Light creatureLight;
+	private Light pickupLight;
+	private Light tileLight;
+	private Light planeLight;
+	private float groundLine;						// coordinates on TileMap where above ground and below ground meet
+	private float aboveGround = 1.44f;				// light intensity when player is above ground
+	private float playerBelowGround = .82f;			// light intensity when player is below ground
+	private float creatureBelowGround = .82f;		// light intensity when player is below ground
+	private float pickupBelowGround = .82f;			// light intensity when player is below ground
+	private float tileBelowGround = .64f;			// light intensity when player is below ground
+	private float planeAboveBelowGround = .13f;		// light intensity when player is below ground

 	void Start ()
 	{
-		player = GameObject.Find("Player");
-		playerState = player.GetComponent<PlayerState>();
+		playerState = GameObject.Find("Player").GetComponent<PlayerState>();
+		playerLight = GameObject.Find("PlayerLight").GetComponent<Light>();
+		creatureLight = GameObject.Find("CreatureLight").GetComponent<Light>();
+		pickupLight = GameObject.Find("PickupLight").GetComponent<Light>();
+		tileLight = GameObject.Find("TileLight").GetComponent<Light>();
+		planeLight = GameObject.Find("PlaneLight").GetComponent<Light>();

-		// light.intensity = aboveGround;
+		OnAboveGround();

 		InvokeRepeating("CheckIfAboveGround", 0f, 0.3F);
 	}

 	void CheckIfAboveGround()
 	{
-		// float targetIntensity;
-		// float fadeAfter = 0f;
-		// float timeToFade = 1f;
+		if (playerState.GetY() > groundLine)
+		{
+			OnAboveGround();
+			Messenger.Broadcast<bool>("player above ground", true);
+		}
+		else
+		{
+			OnBelowGround();
+			Messenger.Broadcast<bool>("player above ground", false);
+		}
+	}

-		// if (playerState.GetY() > groundLine)
-		// {
-		// 	targetIntensity = aboveGround;
-		// 	Messenger.Broadcast<bool>("player above ground", true);
-		// }
-		// else
-		// {
-		// 	targetIntensity = belowGround;
-		// 	Messenger.Broadcast<bool>("player above ground", false);
-		// }
+	void OnAboveGround()
+	{
+		playerLight.intensity = aboveGround;
+		creatureLight.intensity = aboveGround;
+		pickupLight.intensity = aboveGround;
+		tileLight.intensity = aboveGround;
+		planeLight.intensity = planeAboveBelowGround;
+	}

-		// MTween.FadeIntensity(light, targetIntensity, fadeAfter, timeToFade);
+	void OnBelowGround()
+	{
+		MTween.FadeIntensity(playerLight, playerBelowGround, fadeAfter, timeToFade);
+		MTween.FadeIntensity(creatureLight, creatureBelowGround, fadeAfter, timeToFade);
+		MTween.FadeIntensity(pickupLight, pickupBelowGround, fadeAfter, timeToFade);
+		MTween.FadeIntensity(tileLight, tileBelowGround, fadeAfter, timeToFade);
+		MTween.FadeIntensity(planeLight, planeAboveBelowGround, fadeAfter, timeToFade);
 	}

 	void OnSetGroundLine(float coordinates)


Allow current assembly nodes to be cached (#153)

--- Scripts/NodeDataCache.cs
+++ Scripts/NodeDataCache.cs
@@ -56,10 +56,14 @@
             } else {
                 // Else, check all relevant DDLs (slower)
                 // ignore all unity related assemblies
+                // never ignore current executing assembly
+                Assembly executingAssembly = Assembly.GetExecutingAssembly();
                 foreach (Assembly assembly in assemblies) {
-                    if (assembly.FullName.StartsWith("Unity")) continue;
-                    // unity created assemblies always have version 0.0.0
-                    if (!assembly.FullName.Contains("Version=0.0.0")) continue;
+                    if(assembly != executingAssembly) {
+                        if (assembly.FullName.StartsWith("Unity")) continue;
+                        // unity created assemblies always have version 0.0.0
+                        if (!assembly.FullName.Contains("Version=0.0.0")) continue;
+                    }
                     nodeTypes.AddRange(assembly.GetTypes().Where(t => !t.IsAbstract && baseType.IsAssignableFrom(t)).ToArray());
                 }
             }
@@ -126,4 +130,4 @@
             }
         }
     }
-}+}


Fixed DragAndDropByOffset method failing when one offset is zero (#27)

--- Selenium/Common/Mouse.cs
+++ Selenium/Common/Mouse.cs
@@ -39,10 +39,11 @@
             var data = new Dictionary();
             if (element != null)
                 data.Add("element", element.Id);
-            if (xoffset != 0)
+
+            if (xoffset != 0 || yoffset != 0) {
                 data.Add("xoffset", xoffset);
-            if (yoffset != 0)
                 data.Add("yoffset", yoffset);
+            }
             _session.Send(RequestMethod.POST, "/moveto", data);
             return this;
         }


Help updated

Help updated

--- SerialMonitor/Program.cs
+++ SerialMonitor/Program.cs
@@ -933,6 +933,7 @@
          consoleWriteLineNoTrace("-showascii: communication would be show in ASCII format (otherwise HEX is used)");
          consoleWriteLineNoTrace("-notime: time information about incoming data would not be printed");
          consoleWriteLineNoTrace("-gaptolerance {time gap in ms}: messages received within specified time gap will be printed together");
+         consoleWriteLineNoTrace("-continuousmode: start program in standart console mode (scrolling list). Not with primitive text GUI");

          consoleWriteLineNoTrace("");
          consoleWriteLineNoTrace("Example: serialmonitor COM1");


Fixed tabing in CarrierAccount.cs

Fixed tabing in CarrierAccount.cs

--- Shippo/CarrierAccount.cs
+++ Shippo/CarrierAccount.cs
@@ -19,8 +19,8 @@
         [JsonProperty (PropertyName = "active")]
         public object Active { get; set; }

-		[JsonProperty (PropertyName = "metadata")]
-		public object Metadata { get; set; }
+	[JsonProperty (PropertyName = "metadata")]
+	public object Metadata { get; set; }

     }
 }


Enabled enable/disable switch

Enabled enable/disable switch

--- Shortcut/HotkeyBinder.cs
+++ Shortcut/HotkeyBinder.cs
@@ -13,6 +13,11 @@
     {
         private readonly HotkeyContainer _container;
         private readonly HotkeyWindow _hotkeyWindow;
+
+        /// <summary>
+        /// Enables/disables all hotkeys which were bound by this instance
+        /// </summary>
+        public bool HotkeysEnabled { get; set; }

         /// <summary>
         /// Initializes a new instance of the <see cref="HotkeyBinder"/> class.
@@ -106,6 +111,9 @@

         private void OnHotkeyPressed(object sender, HotkeyPressedEventArgs e)
         {
+            if (!HotkeysEnabled)
+                return;
+
             var callback = _container.Find(e.Hotkey);
             callback?.Invoke(e);
         }


Fix issue with JSON deserialization on "/api/me/changepass" in A2BB API controller.

--- A2BBAPI/Controllers/MeController.cs
+++ A2BBAPI/Controllers/MeController.cs
@@ -10,9 +10,11 @@
 using Microsoft.Extensions.Logging;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
+using Newtonsoft.Json.Serialization;
 using System.Collections.Generic;
 using System.Net.Http;
 using System.Net.Http.Headers;
+using System.Reflection;
 using System.Text;
 using System.Threading.Tasks;
 using static A2BBAPI.Utils.ClaimsUtils;
@@ -51,6 +53,11 @@
             _logger = loggerFactory.CreateLogger<MeController>();
         }

+        /// <summary>
+        /// Change user password.
+        /// </summary>
+        /// <param name="req">The request parameters.</param>
+        /// <returns>The response with status.</returns>
         [HttpPut]
         [Route("changepass")]
         public async Task<ResponseWrapper<IdentityResult>> ChangePass([FromBody] ChangePassRequestDTO req)
@@ -91,7 +98,14 @@

             string resContent = await res.Content.ReadAsStringAsync();
             var identityRes = JsonConvert.DeserializeObject<ResponseWrapper<IdentityResult>>(resContent);
-
+
+            // Fix JSON deserialization
+            if (identityRes.Payload.Errors.GetEnumerator().MoveNext() == false)
+            {
+                var prop = identityRes.Payload.GetType().GetProperty("Succeeded");
+                prop.SetValue(identityRes.Payload, true);
+            }
+
             return identityRes;
         }
         #endregion


bugfix

bugfix

--- AGO.WebApiApp/Controllers/ApiController.cs
+++ AGO.WebApiApp/Controllers/ApiController.cs
@@ -12,6 +12,7 @@
 using AGO.Core.Execution;
 using AGO.Core.Json;
 using AGO.Core.Localization;
+using AGO.System.Controllers;
 using Common.Logging;

 namespace AGO.WebApiApp.Controllers
@@ -19,7 +20,10 @@
 	public class ApiController : Controller
 	{
 		public ActionResult Dispatch()
-		{
+		{
+			var usersController = DependencyResolver.Current.GetService<UsersController>();
+			usersController.SetLocale(null, HttpContext.Request.UserLanguages);
+
 			using (ScopeStorage.CreateTransientScope(new Dictionary<object, object>()))
 			{
 				var logged = false;


Refactor method

Refactor method

--- APAnimatorComponent/Editor/SceneHandles.cs
+++ APAnimatorComponent/Editor/SceneHandles.cs
@@ -201,6 +201,7 @@
                 // Draw position handle.
                 var newPos = DrawPositionHandle(
                     nodes[i],
+                    Settings.MovementHandleSize,
                     handleColor,
                     capFunction);

@@ -269,6 +270,7 @@

         private Vector3 DrawPositionHandle(
             Vector3 nodePosition,
+            float handleSize,
             Color handleColor,
             Handles.DrawCapFunction capFunction) {

@@ -276,8 +278,8 @@
             Handles.color = handleColor;

             // Get handle size.
-            var handleSize = HandleUtility.GetHandleSize(nodePosition);
-            var sphereSize = handleSize * Settings.MovementHandleSize;
+            var movementHandleSize = HandleUtility.GetHandleSize(nodePosition);
+            var sphereSize = movementHandleSize * handleSize;

             // Draw handle.
             var newPos = Handles.FreeMoveHandle(


Calling SetMaxPlayer function

Calling SetMaxPlayer function

Instead of changing maxPlayers directly and neglecting to change maxConections

--- Assets/CaptainsMess/CaptainsMess.cs
+++ Assets/CaptainsMess/CaptainsMess.cs
@@ -36,7 +36,7 @@
             networkManager.runInBackground = false; // runInBackground is not recommended on iOS
             networkManager.broadcastIdentifier = broadcastIdentifier;
             networkManager.minPlayers = minPlayers;
-            networkManager.maxPlayers = maxPlayers;
+            networkManager.SetMaxPlayers(maxPlayers); //Setting maxPlayers and maxConnections
             networkManager.allReadyCountdownDuration = countdownDuration;

             // I'm just using a single scene for everything
@@ -145,4 +145,4 @@
     {
         return networkManager.IsHost();
     }
-}+}


Added both possibilities for collecting ingredients

--- Assets/Scripts/CollectIngridient.cs
+++ Assets/Scripts/CollectIngridient.cs
@@ -4,7 +4,14 @@
 using UnityEngine;
 using UnityEngine.UI;

+public enum COLLECTING_MODE {
+    ALL_AT_ONCE,
+    ONE_AT_A_TIME
+}
+
 public class CollectIngridient : Clickable {
+
+    public COLLECTING_MODE collectingMode;

     public GameObject eggs, flour, sugar, salt, milk, butter;
     public Canvas canvas;
@@ -70,42 +77,53 @@
         GetComponentInChildren<Animator>().Play("ws_farmShoot");
         try {
             data = SaveNLoadTxt.Load();
-            string ing = "";
-            if (data.eggQuantity < 2) {
-                data.eggQuantity++;
-                ing = "Egg";
-            } else if (data.flourQuantity < 2) {
-                data.flourQuantity++;
-                ing = "Flour";
-            } else if (data.sugarQuantity < 2) {
-                data.sugarQuantity++;
-                ing = "Sugar";
-            } else if (data.saltQuantity < 1) {
-                data.saltQuantity++;
-                ing = "Salt";
-            } else if (data.butterQuantity < 1) {
-                data.butterQuantity++;
-                ing = "Butter";
-            } else if (data.milkQuantity < 1) {
-                data.milkQuantity++;
-                ing = "Milk";
-            } else {
-                return;
+
+            if (collectingMode == COLLECTING_MODE.ONE_AT_A_TIME) {
+                string ing = "";
+                if (data.eggQuantity < 2) {
+                    data.eggQuantity = 2;
+                    ing = "Egg";
+                } else if (data.flourQuantity < 2) {
+                    data.flourQuantity = 2;
+                    ing = "Flour";
+                } else if (data.sugarQuantity < 2) {
+                    data.sugarQuantity = 2;
+                    ing = "Sugar";
+                } else if (data.saltQuantity < 1) {
+                    data.saltQuantity = 1;
+                    ing = "Salt";
+                } else if (data.butterQuantity < 1) {
+                    data.butterQuantity = 1;
+                    ing = "Butter";
+                } else if (data.milkQuantity < 1) {
+                    data.milkQuantity = 1;
+                    ing = "Milk";
+                } else {
+                    return;
+                }
+
+                Animator[] anims = ingredients.GetComponentsInChildren<Animator>();
+                foreach (Animator anim in anims) {
+                    if (anim.name == ing) {
+                        anim.gameObject.GetComponent<SpriteRenderer>().enabled = true;
+                        anim.Play("FlyingIngredient");
+                    }
+                }
+            } else if (collectingMode == COLLECTING_MODE.ALL_AT_ONCE) {
+				StartCoroutine(ShootAnimation());
+                data.eggQuantity = 2;
+                data.flourQuantity = 2;
+                data.sugarQuantity = 2;
+                data.saltQuantity = 1;
+                data.butterQuantity = 1;
+                data.milkQuantity = 1;
+
             }
 			SaveNLoadTxt.Save(data);
-			//StartCoroutine(ShootAnimation());
-            Animator[] anims = ingredients.GetComponentsInChildren<Animator>();
-            foreach(Animator anim in anims){
-                if(anim.name == ing){
-                    anim.gameObject.GetComponent<SpriteRenderer>().enabled = true;
-                    anim.Play("FlyingIngredient");
-                }
-            }

-
-        } catch(IOException ex) {
+        } catch (IOException ex) {
             StartCoroutine(ShootAnimation());
-        }
+        }

         //isClick = true;


Facing dir fixes.

Facing dir fixes.

--- Assets/Scripts/GenericFootballer.cs
+++ Assets/Scripts/GenericFootballer.cs
@@ -126,9 +126,9 @@
 		BotBase bot = this.GetComponent<BotBase>();
 		if (bot != null) {
 			Vector3 rts = _renderer.transform.localScale;
-			if (bot.Steering.CurrentVelocity.x >= 0.0f) {
+			if (bot.Steering.CurrentVelocity.x > 0.0f) {
 				rts.x = Mathf.Abs(rts.x) * 1;
-			} else {
+			} else if (bot.Steering.CurrentVelocity.x < 0.0f) {
 				rts.x = Mathf.Abs(rts.x) * -1;
 			}
 			_renderer.transform.localScale = rts;


Tests

Tests

--- Augment/Augment.Caching/CacheKey.cs
+++ Augment/Augment.Caching/CacheKey.cs
@@ -1,5 +1,4 @@
 using System;
-using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -7,14 +6,28 @@

 namespace Augment.Caching
 {
-
     class CacheKey
     {
-        #region Members
+        #region Static Members
+
+        private static object _lock = new object();
+
+        private static Dictionary<Type, TypeMap> _baseTypeMaps = new Dictionary<Type, TypeMap>();

         private const string _delimiter = ";";

-        private const string _enumerableKey = "+";
+        private static readonly string _enumerableKey = typeof(IEnumerable<>).Name;
+
+        class TypeMap
+        {
+            public Type CacheType;
+            public Type BaseType;
+            public bool IsEnumerable;
+        }
+
+        #endregion
+
+        #region Members

         private Type _type;

@@ -32,30 +45,55 @@
         {
             _type = type;

-            _baseType = GetBaseType(type);
+            lock (_lock)
+            {
+                TypeMap bt = null;
+
+                if (!_baseTypeMaps.TryGetValue(type, out bt))
+                {
+                    bt = GetBaseType(type);
+
+                    _baseTypeMaps.Add(type, bt);
+                }
+
+                _baseType = bt.BaseType;
+
+                _isEnumerable = bt.IsEnumerable;
+            }
         }

         #endregion

         #region Methods

-        private Type GetBaseType(Type type)
+        private static TypeMap GetBaseType(Type type)
         {
-            if (!type.IsValueType && type.IsGenericType && IsImplementationOf(type, typeof(IEnumerable)))
+            TypeMap bt = new TypeMap
             {
-                _isEnumerable = true;
+                CacheType = type,
+                BaseType = type
+            };

-                Type tg = type.GetGenericArguments().First(x => !x.IsValueType);
+            foreach (Type t in type.GetInterfaces().Where(x => x.IsGenericType))
+            {
+                if (t.Name == typeof(IEnumerable<>).Name)
+                {
+                    bt.IsEnumerable = true;

-                return tg;
+                    Type[] types = t.GetGenericArguments();
+
+                    if (types.Length == 1 && types[0].Name == typeof(KeyValuePair<,>).Name)
+                    {
+                        types = types[0].GetGenericArguments();
+                    }
+
+                    bt.BaseType = types.FirstOrDefault(x => !x.IsValueType) ?? type;
+
+                    break;
+                }
             }

-            return type;
-        }
-
-        private static bool IsImplementationOf(Type baseType, Type interfaceType)
-        {
-            return baseType.GetInterfaces().Any(interfaceType.Equals);
+            return bt;
         }

         public void Add(params object[] cacheKeys)
@@ -78,8 +116,11 @@
                 key.Append(_enumerableKey);
             }

+            System.Diagnostics.Debug.WriteLine(key.ToString());
+
             return key.ToString();
         }
+
         /// <summary>
         /// Gets the cache-key Namespace.Object;by,*,by;+
         /// </summary>
@@ -87,14 +128,16 @@
         {
             StringBuilder key = CreateKey(true);

-            key.Append(@"\").Append(_enumerableKey);
-
-            if (!_isEnumerable)
+            if (_isEnumerable)
+            {
+                key.Append(_enumerableKey);
+            }
+            else
             {
                 //  this is the base type and we want to
                 //  remove all, so assuming anything
                 //  of type BaseType
-                key.Append("?");
+                key.Append(".*");
             }

             return key.Insert(0, "^").Append("$").ToString();


Better single-/multi-file detection

Better single-/multi-file detection

--- BencodeNET/Parsing/TorrentParser.cs
+++ BencodeNET/Parsing/TorrentParser.cs
@@ -74,14 +74,13 @@
                 Trackers = LoadTrackers(data)
             };

-            // TODO: Better check of single/multi file?
-            if (info.ContainsKey(TorrentFields.Files))
+            if (info.ContainsKey(TorrentFields.Length))
+            {
+                torrent.File = LoadSingleFileInfo(info);
+            }
+            else if (info.ContainsKey(TorrentFields.Files))
             {
                 torrent.Files = LoadMultiFileInfoList(info);
-            }
-            else
-            {
-                torrent.File = LoadSingleFileInfo(info);
             }

             return torrent;
@@ -106,9 +105,15 @@
                 TorrentFields.Name
             };

-            // Single-file torrents must have the 'length' field
-            if (!info.ContainsKey(TorrentFields.Files))
-                requiredFields.Add(TorrentFields.Length);
+            // Single-file torrents must have either the 'length' field or the 'files' field, but not both
+            if (info.ContainsKey(TorrentFields.Length) && info.ContainsKey(TorrentFields.Files))
+            {
+                throw new InvalidTorrentException(
+                    $"Torrent 'info'-dictionary cannot contain both '{TorrentFields.Length}' and '{TorrentFields.Files}'.");
+            }
+
+            if (!info.ContainsKey(TorrentFields.Length))
+                requiredFields.Add(TorrentFields.Files);

             EnsureFields(requiredFields, info, "Torrent is missing required field in 'info'-dictionary.");


Added wiki_deleted event type

Added wiki_deleted event type

--- BitbucketSharp/Models/EventModel.cs
+++ BitbucketSharp/Models/EventModel.cs
@@ -27,7 +27,7 @@
                 Commit = "commit", CreateRepo = "create", DeleteRepo = "delete", StripRepo = "strip", ForkRepo = "fork", PatchQueue = "mq",

                 //Wiki
-                WikiCreated = "wiki_created", WikiUpdated = "wiki_updated",
+                WikiCreated = "wiki_created", WikiUpdated = "wiki_updated", WikiDeleted = "wiki_deleted",

                 //Following
                 StartFollowUser = "start_follow_user", StopFollowUser = "stop_follow_user",


Added: IAnalyticsClient

Added: IAnalyticsClient

--- Algolia.Search/Clients/IAnalyticsClient.cs
+++ Algolia.Search/Clients/IAnalyticsClient.cs
@@ -23,10 +23,111 @@
 * THE SOFTWARE.
 */

+using Algolia.Search.Http;
+using Algolia.Search.Models.Analytics;
+using System.Threading;
+using System.Threading.Tasks;
+
 namespace Algolia.Search.Clients
 {
-    public interface IAnalyticsClient
+    /// <summary>
+    /// Analytics client
+    /// </summary>
+    interface IAnalyticsClient
     {
-
+        /// <summary>
+        /// Get an A/B test information and results.
+        /// </summary>
+        /// <param name="abTestId"></param>
+        /// <param name="requestOptions"></param>
+        /// <returns></returns>
+        ABTest GetABTest(long abTestId, RequestOption requestOptions = null);
+
+        /// <summary>
+        /// Get an A/B test information and results.
+        /// </summary>
+        /// <param name="abTestId"></param>
+        /// <param name="requestOptions"></param>
+        /// <param name="ct"></param>
+        /// <returns></returns>
+        Task<ABTest> GetABTestAsync(long abTestId, RequestOption requestOptions = null,
+           CancellationToken ct = default(CancellationToken));
+        /// <summary>
+        /// Fetch all existing AB Tests for App that are available for the current API Key. Returns an array of metadata and metrics.
+        /// </summary>
+        /// <param name="offset"></param>
+        /// <param name="limit"></param>
+        /// <param name="requestOptions"></param>
+        /// <returns></returns>
+        ABTestsReponse GetABTests(int offset = 0, int limit = 10, RequestOption requestOptions = null);
+
+        /// <summary>
+        /// Fetch all existing AB Tests for App that are available for the current API Key. Returns an array of metadata and metrics.
+        /// </summary>
+        /// <param name="offset"></param>
+        /// <param name="limit"></param>
+        /// <param name="requestOptions"></param>
+        /// <param name="ct"></param>
+        /// <returns></returns>
+        Task<ABTestsReponse> GetABTestsAsync(int offset = 0, int limit = 10, RequestOption requestOptions = null,
+           CancellationToken ct = default(CancellationToken));
+
+        /// <summary>
+        /// Creates a new AB Test with provided configuration.
+        /// </summary>
+        /// <param name="aBTest"></param>
+        /// <param name="requestOptions"></param>
+        /// <returns></returns>
+        AddABTestResponse AddABTest(ABTest aBTest, RequestOption requestOptions = null);
+
+        /// <summary>
+        /// Creates a new AB Test with provided configuration.
+        /// </summary>
+        /// <param name="aBTest"></param>
+        /// <param name="requestOptions"></param>
+        /// <param name="ct"></param>
+        /// <returns></returns>
+        Task<AddABTestResponse> AddABTestAsync(ABTest aBTest, RequestOption requestOptions = null,
+            CancellationToken ct = default(CancellationToken));
+
+        /// <summary>
+        /// Marks the A/B Test as stopped. At this point, the test is over and cannot be restarted.
+        /// As a result, your application is back to normal: index A will perform as usual, receiving 100% of all search requests.
+        /// Associated metadata and metrics are still stored
+        /// </summary>
+        /// <param name="abTestId"></param>
+        /// <param name="requestOptions"></param>
+        /// <returns></returns>
+        StopABTestResponse StopABTest(long abTestId, RequestOption requestOptions = null);
+
+        /// <summary>
+        /// Marks the A/B Test as stopped. At this point, the test is over and cannot be restarted.
+        /// As a result, your application is back to normal: index A will perform as usual, receiving 100% of all search requests.
+        /// Associated metadata and metrics are still stored
+        /// </summary>
+        /// <param name="aBTest"></param>
+        /// <param name="requestOptions"></param>
+        /// <param name="ct"></param>
+        /// <returns></returns>
+        Task<StopABTestResponse> StopABTestAsync(long abTestId, RequestOption requestOptions = null,
+           CancellationToken ct = default(CancellationToken));
+
+        /// <summary>
+        /// Deletes the A/B Test and removes all associated metadata & metrics.
+        /// </summary>
+        /// <param name="abTestId"></param>
+        /// <param name="requestOptions"></param>
+        /// <returns></returns>
+        DeleteABTestResponse DeleteABTest(long abTestId, RequestOption requestOptions = null);
+
+        /// <summary>
+        /// Deletes the A/B Test and removes all associated metadata & metrics.
+        /// </summary>
+        /// <param name="abTestId"></param>
+        /// <param name="requestOptions"></param>
+        /// <param name="ct"></param>
+        /// <returns></returns>
+        Task<DeleteABTestResponse> DeleteABTestAsync(long abTestId, RequestOption requestOptions = null,
+           CancellationToken ct = default(CancellationToken));
     }
 }


name refactoring in ActivationOptions

name refactoring in ActivationOptions

--- CSMarkdown.App/ActivationOptions.cs
+++ CSMarkdown.App/ActivationOptions.cs
@@ -18,7 +18,7 @@
         [SwitchArgument('f', "flattenhtml", true, Description = "Use when you don't want the html to be flattened. Default is true")]
         public bool FalttenHtml { get; set; }

-        [ValueArgument(typeof(string), 's', LongName = "smdfile", Description = "Name of the smd file to use")]
+        [ValueArgument(typeof(string), 's', LongName = "smdfile", Description = "Name of the .smd file to use")]
         public string SmdFileName { get; set; }

         [ValueArgument(typeof(string), 'n', LongName = "newfilename", Description = "Name of the output file. If name consists of white spaces, use \"[name]\" around the name")]


--- CSharp/EntityFramework/SqlOutput.cs
+++ CSharp/EntityFramework/SqlOutput.cs
@@ -11,7 +11,7 @@
     var factory = relationalCommandCache.Private<IQuerySqlGeneratorFactory>("_querySqlGeneratorFactory");
     var sqlGenerator = factory.Create();
     var command = sqlGenerator.GetCommand(selectExpression);
-    return command.CommandText;;
+    return command.CommandText;
 }

 private static object Private(this object obj, string privateField) => obj?.GetType().GetField(privateField, BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(obj);


Further tests for #98, slot assignment

Further tests for #98, slot assignment

--- AngleSharp.Core.Tests/Library/ShadowDom.cs
+++ AngleSharp.Core.Tests/Library/ShadowDom.cs
@@ -1,8 +1,10 @@
 namespace AngleSharp.Core.Tests.Library
 {
     using AngleSharp.Dom;
+    using AngleSharp.Dom.Html;
     using NUnit.Framework;
     using System.Threading.Tasks;
+    using System.Linq;

     [TestFixture]
     public class ShadowDomTests
@@ -12,7 +14,7 @@
             var source = @"<!doctype html>

Example

-    Other

+    Other

";
             return BrowsingContext.New().OpenAsync(response =>
                 response.Address("http://localhost").
@@ -38,5 +40,52 @@
             shadowRoot.AppendChild(span);
             Assert.AreEqual(2, shadowRoot.ChildElementCount);
         }
+
+        [Test]
+        public async Task DefaultSlotOfShadowRootShouldContainUnassignedNodes()
+        {
+            var document = await CreateStandardDom();
+            var shadowRoot = document.QuerySelector("#host").AttachShadow(mode: ShadowRootMode.Open);
+            var slot = document.CreateElement("slot") as IHtmlSlotElement;
+            Assert.IsNotNull(slot);
+            shadowRoot.AppendChild(slot);
+            Assert.AreEqual(1, shadowRoot.ChildElementCount);
+            var nodes = slot.GetDistributedNodes().ToArray();
+            Assert.AreEqual(4, nodes.Length);
+            Assert.AreEqual(NodeType.Text, nodes[0].NodeType);
+            Assert.AreEqual(NodeType.Text, nodes[1].NodeType);
+            Assert.AreEqual(NodeType.Element, nodes[2].NodeType);
+            Assert.AreEqual(NodeType.Text, nodes[3].NodeType);
+            Assert.AreEqual(document.QuerySelector("#host > span"), nodes[2]);
+        }
+
+        [Test]
+        public async Task NamedSlotOfShadowRootShouldNotContainNoAssignedNodes()
+        {
+            var document = await CreateStandardDom();
+            var shadowRoot = document.QuerySelector("#host").AttachShadow(mode: ShadowRootMode.Open);
+            var slot = document.CreateElement("slot") as IHtmlSlotElement;
+            Assert.IsNotNull(slot);
+            shadowRoot.AppendChild(slot);
+            slot.Name = "other";
+            Assert.AreEqual(1, shadowRoot.ChildElementCount);
+            var nodes = slot.GetDistributedNodes().ToArray();
+            Assert.AreEqual(0, nodes.Length);
+        }
+
+        [Test]
+        public async Task NamedSlotOfShadowRootShouldContainAssignedNodes()
+        {
+            var document = await CreateStandardDom();
+            var shadowRoot = document.QuerySelector("#host").AttachShadow(mode: ShadowRootMode.Open);
+            var slot = document.CreateElement("slot") as IHtmlSlotElement;
+            Assert.IsNotNull(slot);
+            shadowRoot.AppendChild(slot);
+            slot.Name = "example";
+            Assert.AreEqual(1, shadowRoot.ChildElementCount);
+            var nodes = slot.GetDistributedNodes().ToArray();
+            Assert.AreEqual(1, nodes.Length);
+            Assert.AreEqual(document.QuerySelector("#host > div"), nodes[0]);
+        }
     }
 }


FileExplorer icons update

FileExplorer icons update

--- AppLib.WPF/Converters/FileIconConverter.cs
+++ AppLib.WPF/Converters/FileIconConverter.cs
@@ -72,6 +72,30 @@
                 case ".rpm":
                 case ".deb":
                     return ImageAwesome.CreateImageSource(FaIcons.fa_file_archive_o, new SolidColorBrush(Colors.Black));
+                case ".c":
+                case ".h":
+                case ".cpp":
+                case ".xml":
+                case ".xaml":
+                case ".cs":
+                case ".vb":
+                case ".js":
+                case ".css":
+                case ".py":
+                case ".lua":
+                case ".less":
+                case ".java":
+                case ".php":
+                case ".r":
+                case ".perl":
+                case ".tcl":
+                case ".matlab":
+                case ".pde":
+                case ".ino":
+                    return ImageAwesome.CreateImageSource(FaIcons.fa_file_code_o, new SolidColorBrush(Colors.Black));
+                case ".txt":
+                case ".md":
+                    return ImageAwesome.CreateImageSource(FaIcons.fa_file_text_o, new SolidColorBrush(Colors.Black));
                 case ".exe":
                     return ImageAwesome.CreateImageSource(FaIcons.fa_windows, new SolidColorBrush(Colors.Black));
                 default:


transmit the names of files/dirs rather than their full path

--- Application/Nfs/FileSystem/NfsDirectory.cs
+++ Application/Nfs/FileSystem/NfsDirectory.cs
@@ -135,8 +135,8 @@
 					throw new NFSException(xId, (uint)NfsReply.ERR_NOENT);
 				}

-				List<String> dirFiles = Directory.GetFiles(dirName).ToList();
-				dirFiles.AddRange(Directory.GetDirectories(dirName));
+				List<String> dirFiles = Directory.GetFiles(dirName).Select(f => new FileInfo(f).Name).ToList();
+				dirFiles.AddRange(Directory.GetDirectories(dirName).Select(d => new DirectoryInfo(d).Name));

 				if (dirFiles == null) {
 					throw new NFSException(xId, (uint)NfsReply.ERR_NOENT);


Updated version

Updated version

--- Commands/Properties/AssemblyInfo.cs
+++ Commands/Properties/AssemblyInfo.cs
@@ -44,6 +44,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("2.27.1806.0")]
-[assembly: AssemblyFileVersion("2.27.1806.0")]
+[assembly: AssemblyVersion("2.26.1805.1")]
+[assembly: AssemblyFileVersion("2.26.1805.1")]
 [assembly: InternalsVisibleTo("SharePointPnP.PowerShell.Tests")]


Window.Hammingメソッドの実装を変更

Window.Hammingメソッドの実装を変更

--- src/Math/Window.cs
+++ src/Math/Window.cs
@@ -45,13 +45,10 @@
         {
             int length = array.Length;
             double factor = 2.0 * Math.PI / (double)length;
+            double k = (length & 1) == 0 ? 0.0 : 0.5;

-            if (length % 2 == 0)
-                for (int i = 0; i < length; i++)
-                    array[i] *= 0.54 - 0.46 * Math.Cos(factor * i);
-            else
-                for (int i = 0; i < length; i++)
-                    array[i] *= 0.54 - 0.46 * Math.Cos(factor * (i + 0.5));
+            for (int i = 0; i < length; i++, k++)
+                array[i] *= 0.54 - 0.46 * Math.Cos(factor * k);
         }

         public static void Bartlett(double[] array)


Milestone get

Milestone get

--- Controllers/MilestonesController.cs
+++ Controllers/MilestonesController.cs
@@ -14,9 +14,9 @@
             RepositoryController = repository;
         }

-        public GitHubRequest<List<MilestoneModel>> GetAll(int page = 1, int perPage = 100)
+        public GitHubRequest<List<MilestoneModel>> GetAll(bool opened = true, string sort = "due_date", string direction = "desc")
         {
-            return GitHubRequest.Get<List<MilestoneModel>>(Uri, new { page = page, per_page = perPage });
+            return GitHubRequest.Get<List<MilestoneModel>>(Uri, new { state = opened ? "open" : "closed", sort, direction });
         }

         public override string Uri


Added clearing mocks after synchronized call

--- TddToolkit/SyncAssert.cs
+++ TddToolkit/SyncAssert.cs
@@ -31,11 +31,16 @@
         });

         callToCheck(wrappingObject);
-        throw new Exception("The specified method was probably not called by the proxy with exactly the same arguments it received");
+        throw new Exception(
+          "The specified method was probably not called by the proxy with exactly the same arguments it received");
       }
       catch
       {
         lockAssertions.AssertUnlocked();
+      }
+      finally
+      {
+        wrappedObjectMock.ClearReceivedCalls();
       }
     }

@@ -43,11 +48,19 @@
                                                           LockAssertions lockAssertions)
       where T : class
     {
-      wrappedObjectMock.When(callToCheck).Do(_ => lockAssertions.AssertLocked());
-      lockAssertions.AssertUnlocked();
-      callToCheck(wrappingObject);
-      lockAssertions.AssertUnlocked();
-      callToCheck(wrappedObjectMock.Received(1));
+      try
+      {
+
+        wrappedObjectMock.When(callToCheck).Do(_ => lockAssertions.AssertLocked());
+        lockAssertions.AssertUnlocked();
+        callToCheck(wrappingObject);
+        lockAssertions.AssertUnlocked();
+        callToCheck(wrappedObjectMock.Received(1));
+      }
+      finally
+      {
+        wrappedObjectMock.ClearReceivedCalls();
+      }
     }

     private static void LockShouldBeReleasedAfterACall<T, TReturn>(T wrappingObject, T wrappedObjectMock,
@@ -55,17 +68,25 @@
                                                                    LockAssertions lockAssertions)
       where T : class
     {
-      var cannedResult = Any.Instance<TReturn>();
-      callToCheck(wrappedObjectMock).Returns((ci) =>
+      try
       {
-        lockAssertions.AssertLocked();
-        return cannedResult;
-      });
+        var cannedResult = Any.Instance<TReturn>();
+        callToCheck(wrappedObjectMock).Returns((ci) =>
+        {
+          lockAssertions.AssertLocked();
+          return cannedResult;
+        });

-      lockAssertions.AssertUnlocked();
-      var actualResult = callToCheck(wrappingObject);
-      lockAssertions.AssertUnlocked();
-      Equal(cannedResult, actualResult, "The specified method was probably not called by the proxy with exactly the same arguments it received or it did not return the value obtained from wrapped call");
+        lockAssertions.AssertUnlocked();
+        var actualResult = callToCheck(wrappingObject);
+        lockAssertions.AssertUnlocked();
+        Equal(cannedResult, actualResult,
+              "The specified method was probably not called by the proxy with exactly the same arguments it received or it did not return the value obtained from wrapped call");
+      }
+      finally
+      {
+        wrappedObjectMock.ClearReceivedCalls();
+      }
     }
   }


sry forgot to add

sry forgot to add

--- Resin/IndexReader.cs
+++ Resin/IndexReader.cs
@@ -60,6 +60,7 @@
                             if (hits.TryGetValue(doc.DocId, out dscore))
                             {
                                 scorer.Score(dscore);
+                                dscore.Score += doc.Score;
                                 aggr.Add(dscore.DocId, dscore);
                             }
                         }


Changed the examples to use using for driver and session resources Removed using driver if not needed Changed driver to be a local var

--- Neo4j.Driver/Neo4j.Driver.IntegrationTests/Examples.cs
+++ Neo4j.Driver/Neo4j.Driver.IntegrationTests/Examples.cs
@@ -17,7 +17,6 @@

 using System;
 using System.Collections.Generic;
-using System.IO;
 using System.Linq;
 using FluentAssertions;
 //tag::minimal-example-import[]
@@ -26,7 +25,6 @@
 using Neo4j.Driver.IntegrationTests;
 using Xunit;
 using Xunit.Abstractions;
-using Path = System.IO.Path;

 namespace Neo4j.Driver.Examples
 {
@@ -37,11 +35,14 @@
         private readonly string _serverEndPoint;
         private readonly IAuthToken _authToken;

+        private readonly IDriver _driver;
+
         public Examples(ITestOutputHelper output, IntegrationTestFixture fixture)
         {
             Output = output;
             _serverEndPoint = fixture.ServerEndPoint;
             _authToken = fixture.AuthToken;
+            _driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
             ClearDatabase();
         }

@@ -89,231 +90,229 @@
         [Fact]
         public void Statement()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-
-            //tag::statement[]
-            var result = session.Run("CREATE (person:Person {name: {name}})",
-                new Dictionary<string, object> { {"name", "Arthur"} });
-            //end::statement[]
-
-            result.Consume();
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                //tag::statement[]
+                var result = session.Run("CREATE (person:Person {name: {name}})",
+                    new Dictionary<string, object> {{"name", "Arthur"}});
+                //end::statement[]
+                result.Consume();
+            }
         }

         [Fact]
         public void StatementWithoutParams()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-
-            //tag::statement-without-parameters[]
-            var result = session.Run("CREATE (p:Person {name: 'Arthur'})");
-            //end::statement-without-parameters[]
-            result.Consume();
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                //tag::statement-without-parameters[]
+                var result = session.Run("CREATE (p:Person {name: 'Arthur'})");
+                //end::statement-without-parameters[]
+                result.Consume();
+            }
         }

         [Fact]
         public void ResultTraversal()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-            session.Run("CREATE (weapon:Weapon {name: {name}})",
-                        new Dictionary<string, object> { {"name", "Sword in the stone"} });
-
-            //tag::result-traversal[]
-            var searchTerm = "Sword";
-            var result = session.Run("MATCH (weapon:Weapon) WHERE weapon.name CONTAINS {term} " +
-                                     "RETURN weapon.name",
-                                    new Dictionary<string, object> { {"term", searchTerm} });
-
-            Output.WriteLine($"List of weapons called {searchTerm}:");
-            foreach (var record in result)
-            {
-                Output.WriteLine(record["weapon.name"].As<string>());
-            }
-            //end::result-traversal[]
-
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                session.Run("CREATE (weapon:Weapon {name: {name}})",
+                    new Dictionary<string, object> {{"name", "Sword in the stone"}});
+
+                //tag::result-traversal[]
+                var searchTerm = "Sword";
+                var result = session.Run("MATCH (weapon:Weapon) WHERE weapon.name CONTAINS {term} " +
+                                         "RETURN weapon.name",
+                    new Dictionary<string, object> {{"term", searchTerm}});
+
+                Output.WriteLine($"List of weapons called {searchTerm}:");
+                foreach (var record in result)
+                {
+                    Output.WriteLine(record["weapon.name"].As<string>());
+                }
+                //end::result-traversal[]
+            }
         }

         [Fact]
         public void AccessRecord()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-            session.Run("CREATE (weapon:Weapon {name: {name}, owner: {owner}, material: {material}, size: {size}})",
-                        new Dictionary<string, object> { {"name", "Sword in the stone"}, {"owner", "Arthur"},
-                                                       {"material", "Stone"}, {"size", "Huge"} });
-
-            session.Run("CREATE (weapon:Weapon {name: {name}, owner: {owner}, material: {material}, size: {size}})",
-                        new Dictionary<string, object> { {"name", "Excalibur"}, {"owner", "Arthur"},
-                                                       {"material", "Iron"}, {"size", "Enormous"} });
-
-            //tag::access-record[]
-            var searchTerm = "Arthur";
-            var result = session.Run("MATCH (weapon:Weapon) WHERE weapon.owner CONTAINS {term} " +
-                                     "RETURN weapon.name, weapon.material, weapon.size",
-                                    new Dictionary<string, object> { {"term", searchTerm} });
-
-            Output.WriteLine($"List of weapons owned by {searchTerm}:");
-            foreach (var record in result)
-            {
-                var list = record.Keys.Select(key => $"{key}: {record[key]}").ToList();
-                Output.WriteLine(string.Join(", ", list));
-            }
-            //end::access-record[]
-
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                session.Run("CREATE (weapon:Weapon {name: {name}, owner: {owner}, material: {material}, size: {size}})",
+                    new Dictionary<string, object>
+                    {
+                        {"name", "Sword in the stone"},
+                        {"owner", "Arthur"},
+                        {"material", "Stone"},
+                        {"size", "Huge"}
+                    });
+
+                session.Run("CREATE (weapon:Weapon {name: {name}, owner: {owner}, material: {material}, size: {size}})",
+                    new Dictionary<string, object>
+                    {
+                        {"name", "Excalibur"},
+                        {"owner", "Arthur"},
+                        {"material", "Iron"},
+                        {"size", "Enormous"}
+                    });
+
+                //tag::access-record[]
+                var searchTerm = "Arthur";
+                var result = session.Run("MATCH (weapon:Weapon) WHERE weapon.owner CONTAINS {term} " +
+                                         "RETURN weapon.name, weapon.material, weapon.size",
+                    new Dictionary<string, object> {{"term", searchTerm}});
+
+                Output.WriteLine($"List of weapons owned by {searchTerm}:");
+                foreach (var record in result)
+                {
+                    var list = record.Keys.Select(key => $"{key}: {record[key]}").ToList();
+                    Output.WriteLine(string.Join(", ", list));
+                }
+                //end::access-record[]
+            }
         }

         [Fact]
         public void RetainResultQuery()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-            session.Run("CREATE (knight:Person:Knight {name: {name}, castle: {castle}})",
-                        new Dictionary<string, object> { {"name", "Lancelot"}, {"castle", "Camelot"} });
-
-            //tag::retain-result[]
-            var result = session.Run("MATCH (knight:Person:Knight) WHERE knight.castle = {castle} " +
-                                     "RETURN knight.name AS name",
-                                    new Dictionary<string, object> { {"castle", "Camelot"} });
-
-            var records = result.ToList();
-            session.Dispose();
-
-            foreach (var record in records)
-            {
-                Output.WriteLine($"{record["name"].As<string>()} is a knight of Camelot");
-            }
-            //end::retain-result[]
-
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                session.Run("CREATE (knight:Person:Knight {name: {name}, castle: {castle}})",
+                    new Dictionary<string, object> {{"name", "Lancelot"}, {"castle", "Camelot"}});
+            }
+
+            using (var session = _driver.Session())
+            {
+
+                //tag::retain-result[]
+                var result = session.Run("MATCH (knight:Person:Knight) WHERE knight.castle = {castle} " +
+                                         "RETURN knight.name AS name",
+                    new Dictionary<string, object> {{"castle", "Camelot"}});
+
+                var records = result.ToList();
+
+                foreach (var record in records)
+                {
+                    Output.WriteLine($"{record["name"].As<string>()} is a knight of Camelot");
+                }
+                //end::retain-result[]
+            }
         }

         [Fact]
         public void NestedStatements()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-            session.Run("CREATE (knight:Person:Knight {name: {name}, castle: {castle}})",
-                        new Dictionary<string, object> { {"name", "Lancelot"}, {"castle", "Camelot"} });
-
-            session.Run("CREATE (knight:Person {name: {name}, title: {title}})",
-                        new Dictionary<string, object> { {"name", "Arthur"}, {"title", "King"} });
-
-            //tag::nested-statements[]
-            var result = session.Run("MATCH (knight:Person:Knight) WHERE knight.castle = {castle} " +
-                                     "RETURN id(knight) AS knight_id",
-                                    new Dictionary<string, object> { {"castle", "Camelot"} });
-
-            foreach (var record in result)
-            {
-                session.Run("MATCH (knight) WHERE id(knight) = {id} " +
-                            "MATCH (king:Person) WHERE king.name = {king} " +
-                            "CREATE (knight)-[:DEFENDS]->(king)",
-                    new Dictionary<string, object> { {"id", record["knight_id"]}, {"king", "Arthur"} });
-            }
-            //end::nested-statements[]
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                session.Run("CREATE (knight:Person:Knight {name: {name}, castle: {castle}})",
+                    new Dictionary<string, object> {{"name", "Lancelot"}, {"castle", "Camelot"}});
+
+                session.Run("CREATE (knight:Person {name: {name}, title: {title}})",
+                    new Dictionary<string, object> {{"name", "Arthur"}, {"title", "King"}});
+
+                //tag::nested-statements[]
+                var result = session.Run("MATCH (knight:Person:Knight) WHERE knight.castle = {castle} " +
+                                         "RETURN id(knight) AS knight_id",
+                    new Dictionary<string, object> {{"castle", "Camelot"}});
+
+                foreach (var record in result)
+                {
+                    session.Run("MATCH (knight) WHERE id(knight) = {id} " +
+                                "MATCH (king:Person) WHERE king.name = {king} " +
+                                "CREATE (knight)-[:DEFENDS]->(king)",
+                        new Dictionary<string, object> {{"id", record["knight_id"]}, {"king", "Arthur"}});
+                }
+                //end::nested-statements[]
+            }
         }

         [Fact]
         public void HandleCypherError()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-            var ex = Record.Exception(() =>
-            {
-                //tag::handle-cypher-error[]
-                try
-                {
-                    session.Run("This will cause a syntax error").Consume();
-                }
-                catch (ClientException)
-                {
-                    throw new InvalidOperationException("Something really bad has happened!");
-                }
-                //end::handle-cypher-error[]
-            });
-
-            driver.Dispose();
-            ex.Should().BeOfType<InvalidOperationException>();
+            using (var session = _driver.Session())
+            {
+                var ex = Record.Exception(() =>
+                {
+                    //tag::handle-cypher-error[]
+                    try
+                    {
+                        session.Run("This will cause a syntax error").Consume();
+                    }
+                    catch (ClientException)
+                    {
+                        throw new InvalidOperationException("Something really bad has happened!");
+                    }
+                    //end::handle-cypher-error[]
+                });
+                ex.Should().BeOfType<InvalidOperationException>();
+            }
         }

         [Fact]
         public void TransactionCommit()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-
-            //tag::transaction-commit[]
-            using (var tx = session.BeginTransaction())
-            {
-                tx.Run("CREATE (:Person {name: {name}})",
-                        new Dictionary<string, object> { {"name", "Guinevere"} });
-                tx.Success();
-            }
-            //end::transaction-commit[]
-
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                //tag::transaction-commit[]
+                using (var tx = session.BeginTransaction())
+                {
+                    tx.Run("CREATE (:Person {name: {name}})",
+                        new Dictionary<string, object> {{"name", "Guinevere"}});
+                    tx.Success();
+                }
+                //end::transaction-commit[]
+            }
         }

         [Fact]
         public void TransactionRollback()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-
-            //tag::transaction-rollback[]
-            using (var tx = session.BeginTransaction())
-            {
-                tx.Run("CREATE (:Person {name: {name}})",
-                        new Dictionary<string, object> { {"name", "Merlin"} });
-                // optional to explicitly call tx.Failure();
-            }
-            //end::transaction-rollback[]
-
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                //tag::transaction-rollback[]
+                using (var tx = session.BeginTransaction())
+                {
+                    tx.Run("CREATE (:Person {name: {name}})",
+                        new Dictionary<string, object> {{"name", "Merlin"}});
+                    // optional to explicitly call tx.Failure();
+                }
+                //end::transaction-rollback[]
+            }
         }

         [Fact]
         public void ResultSummaryQueryProfile()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-
-            //tag::result-summary-query-profile[]
-            var result = session.Run("PROFILE MATCH (p:Person {name: {name}}) RETURN id(p)",
-                            new Dictionary<string, object> { {"name", "Arthur"} });
-
-            IResultSummary summary = result.Consume();
-
-            Output.WriteLine(summary.StatementType.ToString());
-            Output.WriteLine(summary.Profile.ToString());
-            //end::result-summary-query-profile[]
-
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                //tag::result-summary-query-profile[]
+                var result = session.Run("PROFILE MATCH (p:Person {name: {name}}) RETURN id(p)",
+                    new Dictionary<string, object> {{"name", "Arthur"}});
+
+                IResultSummary summary = result.Consume();
+
+                Output.WriteLine(summary.StatementType.ToString());
+                Output.WriteLine(summary.Profile.ToString());
+                //end::result-summary-query-profile[]
+            }
         }

         [Fact]
         public void ResultSummaryNotifications()
         {
-            var driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-
-            //tag::result-summary-notifications[]
-            var summary = session.Run("EXPLAIN MATCH (king), (queen) RETURN king, queen").Consume();
-
-            foreach (var notification in summary.Notifications)
-            {
-                Output.WriteLine(notification.ToString());
-            }
-            //end::result-summary-notifications[]
-
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                //tag::result-summary-notifications[]
+                var summary = session.Run("EXPLAIN MATCH (king), (queen) RETURN king, queen").Consume();
+
+                foreach (var notification in summary.Notifications)
+                {
+                    Output.WriteLine(notification.ToString());
+                }
+                //end::result-summary-notifications[]
+            }
         }

         [Fact(Skip = "Requires server certificate to be installed on host system.")]
@@ -349,34 +348,16 @@

         private void ClearDatabase()
         {
-            IDriver driver = GraphDatabase.Driver(_serverEndPoint, _authToken);
-            var session = driver.Session();
-            var result = session.Run("MATCH (n) DETACH DELETE n RETURN count(*)");
-            result.ToList();
-            driver.Dispose();
+            using (var session = _driver.Session())
+            {
+                var result = session.Run("MATCH (n) DETACH DELETE n RETURN count(*)");
+                result.ToList();
+            }
         }

         //tag::tls-trust-on-first-use[]
         // Not supported in this driver
         //end::tls-trust-on-first-use[]
-
-        [Fact]
-        public void TlsTrustOnFirstUse()
-        {
-            var knownHostsFileName = Path.GetTempPath() + Guid.NewGuid() + ".tmp";
-
-            var driver = GraphDatabase.Driver("bolt://localhost", AuthTokens.Basic("neo4j", "neo4j"),
-                Config.Builder.WithEncryptionLevel(EncryptionLevel.Encrypted).WithTrustStrategy(TrustStrategy.TrustAllCertificates)
-                .ToConfig());
-            using (var session = driver.Session())
-            {
-                var result = session.Run("RETURN 1 as n");
-                result.Single()["n"].As<int>().Should().Be(1);
-            }
-            driver.Dispose();
-
-            File.Delete(knownHostsFileName);
-        }
     }

     // TODO Remove it after we figure out a way to solve the naming problem


remove net48 from ReleaseMaker

remove net48 from ReleaseMaker

--- tool/OpenCvSharp.ReleaseMaker/Packer.cs
+++ tool/OpenCvSharp.ReleaseMaker/Packer.cs
@@ -10,68 +10,51 @@
     {
         private static readonly IReadOnlyDictionary<string, string[]> dllFiles = new Dictionary<string, string[]>
         {
-            {
-                "net48", new[]
-                {
-                    @"OpenCvSharp\bin\Release\net48\OpenCvSharp.dll",
-                    @"OpenCvSharp\bin\Release\net48\OpenCvSharp.dll.config",
-                    @"OpenCvSharp\bin\Release\net48\OpenCvSharp.pdb",
-                    @"OpenCvSharp.Extensions\bin\Release\net48\OpenCvSharp.Extensions.dll",
-                    @"OpenCvSharp.Extensions\bin\Release\net48\OpenCvSharp.Extensions.pdb",
-                    @"OpenCvSharp.WpfExtensions\bin\Release\net48\OpenCvSharp.WpfExtensions.dll",
-                    @"OpenCvSharp.WpfExtensions\bin\Release\net48\OpenCvSharp.WpfExtensions.pdb",
-                }
-            },{
-                "net461", new[]
-                {
-                    @"OpenCvSharp\bin\Release\net461\OpenCvSharp.dll",
-                    @"OpenCvSharp\bin\Release\net461\OpenCvSharp.dll.config",
-                    @"OpenCvSharp\bin\Release\net461\OpenCvSharp.pdb",
-                    @"OpenCvSharp.Extensions\bin\Release\net461\OpenCvSharp.Extensions.dll",
-                    @"OpenCvSharp.Extensions\bin\Release\net461\OpenCvSharp.Extensions.pdb",
-                    @"OpenCvSharp.WpfExtensions\bin\Release\net48\OpenCvSharp.WpfExtensions.dll",
-                    @"OpenCvSharp.WpfExtensions\bin\Release\net48\OpenCvSharp.WpfExtensions.pdb",
-                }
-            },{
-                "netstandard2.0", new[]
-                {
-                    @"OpenCvSharp\bin\Release\netstandard2.0\OpenCvSharp.dll",
-                    @"OpenCvSharp\bin\Release\netstandard2.0\OpenCvSharp.dll.config",
-                    @"OpenCvSharp\bin\Release\netstandard2.0\OpenCvSharp.pdb",
-                    @"OpenCvSharp.Extensions\bin\Release\netstandard2.0\OpenCvSharp.Extensions.dll",
-                    @"OpenCvSharp.Extensions\bin\Release\netstandard2.0\OpenCvSharp.Extensions.pdb",
-                }
-            },{
-                "netstandard2.1", new[]
-                {
-                    @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.dll",
-                    @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.dll.config",
-                    @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.pdb",
-                    @"OpenCvSharp.Extensions\bin\Release\netstandard2.1\OpenCvSharp.Extensions.dll",
-                    @"OpenCvSharp.Extensions\bin\Release\netstandard2.1\OpenCvSharp.Extensions.pdb",
-                }
-            },{
-                "netcoreapp2.1", new[]
-                {
-                    @"OpenCvSharp\bin\Release\netcoreapp2.1\OpenCvSharp.dll",
-                    @"OpenCvSharp\bin\Release\netcoreapp2.1\OpenCvSharp.dll.config",
-                    @"OpenCvSharp\bin\Release\netcoreapp2.1\OpenCvSharp.pdb",
-                    @"OpenCvSharp.Extensions\bin\Release\netcoreapp2.1\OpenCvSharp.Extensions.dll",
-                    @"OpenCvSharp.Extensions\bin\Release\netcoreapp2.1\OpenCvSharp.Extensions.pdb",
-                }
-            },{
-                "netcoreapp3.1", new[]
-                {
-                    // netstandard2.1
-                    @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.dll",
-                    @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.dll.config",
-                    @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.pdb",
-                    @"OpenCvSharp.Extensions\bin\Release\netstandard2.1\OpenCvSharp.Extensions.dll",
-                    @"OpenCvSharp.Extensions\bin\Release\netstandard2.1\OpenCvSharp.Extensions.pdb",
-                    // netcoreapp3.1
-                    @"OpenCvSharp.WpfExtensions\bin\Release\netcoreapp3.1\OpenCvSharp.WpfExtensions.dll",
-                    @"OpenCvSharp.WpfExtensions\bin\Release\netcoreapp3.1\OpenCvSharp.WpfExtensions.pdb",
-                }
+            ["net461"] = new[]
+            {
+                @"OpenCvSharp\bin\Release\net461\OpenCvSharp.dll",
+                @"OpenCvSharp\bin\Release\net461\OpenCvSharp.dll.config",
+                @"OpenCvSharp\bin\Release\net461\OpenCvSharp.pdb",
+                @"OpenCvSharp.Extensions\bin\Release\net461\OpenCvSharp.Extensions.dll",
+                @"OpenCvSharp.Extensions\bin\Release\net461\OpenCvSharp.Extensions.pdb",
+                @"OpenCvSharp.WpfExtensions\bin\Release\net48\OpenCvSharp.WpfExtensions.dll",
+                @"OpenCvSharp.WpfExtensions\bin\Release\net48\OpenCvSharp.WpfExtensions.pdb",
+            },
+            ["netstandard2.0"] = new[]
+            {
+                @"OpenCvSharp\bin\Release\netstandard2.0\OpenCvSharp.dll",
+                @"OpenCvSharp\bin\Release\netstandard2.0\OpenCvSharp.dll.config",
+                @"OpenCvSharp\bin\Release\netstandard2.0\OpenCvSharp.pdb",
+                @"OpenCvSharp.Extensions\bin\Release\netstandard2.0\OpenCvSharp.Extensions.dll",
+                @"OpenCvSharp.Extensions\bin\Release\netstandard2.0\OpenCvSharp.Extensions.pdb",
+            },
+            ["netstandard2.1"] = new[]
+            {
+                @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.dll",
+                @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.dll.config",
+                @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.pdb",
+                @"OpenCvSharp.Extensions\bin\Release\netstandard2.1\OpenCvSharp.Extensions.dll",
+                @"OpenCvSharp.Extensions\bin\Release\netstandard2.1\OpenCvSharp.Extensions.pdb",
+            },
+            ["netcoreapp2.1"] = new[]
+            {
+                @"OpenCvSharp\bin\Release\netcoreapp2.1\OpenCvSharp.dll",
+                @"OpenCvSharp\bin\Release\netcoreapp2.1\OpenCvSharp.dll.config",
+                @"OpenCvSharp\bin\Release\netcoreapp2.1\OpenCvSharp.pdb",
+                @"OpenCvSharp.Extensions\bin\Release\netcoreapp2.1\OpenCvSharp.Extensions.dll",
+                @"OpenCvSharp.Extensions\bin\Release\netcoreapp2.1\OpenCvSharp.Extensions.pdb",
+            },
+            ["netcoreapp3.1"] = new[]
+            {
+                // netstandard2.1
+                @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.dll",
+                @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.dll.config",
+                @"OpenCvSharp\bin\Release\netstandard2.1\OpenCvSharp.pdb",
+                @"OpenCvSharp.Extensions\bin\Release\netstandard2.1\OpenCvSharp.Extensions.dll",
+                @"OpenCvSharp.Extensions\bin\Release\netstandard2.1\OpenCvSharp.Extensions.pdb",
+                // netcoreapp3.1
+                @"OpenCvSharp.WpfExtensions\bin\Release\netcoreapp3.1\OpenCvSharp.WpfExtensions.dll",
+                @"OpenCvSharp.WpfExtensions\bin\Release\netcoreapp3.1\OpenCvSharp.WpfExtensions.pdb",
             }
         };

@@ -100,7 +83,7 @@
             "opencv_world451.dll",
             "opencv_img_hash451.dll"
         };
-
+
         private static readonly HashSet<string> ignoredExt = new[]{
             ".bak",
             ".user",
@@ -142,7 +125,7 @@
             var dstFileName = Path.Combine(dirDst, GetBinaryDstDirName(opencvVersion)) + ".zip";
             using var zipStream = File.OpenWrite(dstFileName);
             using var zipArchive = new ZipArchive(zipStream, ZipArchiveMode.Create, false);
-
+
             // net40, netcoreapp2.0といったplatformごとにDLLを選択
             foreach (var (frameworkName, dllFileNames) in dllFiles)
             {
@@ -180,7 +163,7 @@
                     var pfExtern = (arch == "x86") ? "Win32" : "x64";
                     externDir = Path.Combine(externDir, pfExtern);

-                    foreach (var ext in new[] {"dll", "pdb"})
+                    foreach (var ext in new[] { "dll", "pdb" })
                     {
                         var dstDirectory = Path.Combine("NativeLib", p.Key, arch);

@@ -246,9 +229,9 @@
             ZipFile.CreateFromDirectory(
                 dirDst,
                 dstFileName,
-                CompressionLevel.Optimal,
+                CompressionLevel.Optimal,
                 false);
-
+
             Directory.Delete(dirDst, true);
         }


quick fix

quick fix

--- Noxa.Emulation.Psp.Video.ManagedGL/MGLDriver.Worker.cs
+++ Noxa.Emulation.Psp.Video.ManagedGL/MGLDriver.Worker.cs
@@ -226,8 +226,14 @@
 							//Gl.glFlush();
 						}
 						list.State = DisplayListState.Done;
-						if( _callbacks.FinishFunction != 0 )
-							this.Emu.Cpu.MarshalCall( -1, _callbacks.FinishFunction, new uint[] { ( uint )list.ID, _callbacks.FinishArgument }, null, 0 );
+						if( list.CallbackID > 0 )
+						{
+							if( _callbacks.FinishFunction != 0 )
+							{
+								Log.WriteLine( Verbosity.Verbose, Feature.Video, "calling GE finish callback at 0x{0:X8} with arg 0x{1:X8}", _callbacks.FinishFunction, _callbacks.FinishArgument );
+								this.Emu.Cpu.MarshalCall( -1, _callbacks.FinishFunction, new uint[] { ( uint )list.ID, _callbacks.FinishArgument }, null, 0 );
+							}
+						}
 						continue;
 					case VideoCommand.END:
 						listDone = true;


minor update (issue #21)

minor update (issue #21)

--- src/SharpExpress/HttpRequestImpl.cs
+++ src/SharpExpress/HttpRequestImpl.cs
@@ -19,8 +19,8 @@
 		private readonly HttpContextImpl _context;
 		private readonly string _method;
 		private readonly Uri _url;
-		private string _protocol;
-		private NameValueCollection _queryString;
+		private readonly string _protocol;
+		private readonly NameValueCollection _queryString;
 		private readonly NameValueCollection _headers;
 		private readonly Stream _body;

@@ -67,7 +67,7 @@
 		public override byte[] BinaryRead(int count)
 		{
 			var buf = new byte[count];
-			InputStream.Read(buf, 0, count);
+			_body.Read(buf, 0, count);
 			return buf;
 		}

@@ -156,7 +156,7 @@

 		public override int TotalBytes
 		{
-			get { return (int)InputStream.Length; }
+			get { return (int)_body.Length; }
 		}

 		public override Uri Url
@@ -202,7 +202,7 @@

 		public Stream Body
 		{
-			get { return InputStream; }
+			get { return _body; }
 		}

 		public Encoding Encoding { get; set; }