Add overload

Add overload

--- src/Features/Core/Portable/QuickInfo/QuickInfoUtilities.cs
+++ src/Features/Core/Portable/QuickInfo/QuickInfoUtilities.cs
@@ -20,15 +20,19 @@
 {
     internal static class QuickInfoUtilities
     {
+
+        public static Task<QuickInfoItem> CreateQuickInfoItemAsync(Workspace workspace, SemanticModel semanticModel, TextSpan span, ImmutableArray<ISymbol> symbols, CancellationToken cancellationToken)
+            => CreateQuickInfoItemAsync(workspace, semanticModel, span, symbols, supportedPlatforms: null, showAwaitReturn: false, flowState: NullableFlowState.None, cancellationToken);
+
         public static async Task<QuickInfoItem> CreateQuickInfoItemAsync(
             Workspace workspace,
             SemanticModel semanticModel,
             TextSpan span,
             ImmutableArray<ISymbol> symbols,
-            SupportedPlatformData? supportedPlatforms = null,
-            bool showAwaitReturn = false,
-            NullableFlowState flowState = NullableFlowState.None,
-            CancellationToken cancellationToken = default)
+            SupportedPlatformData? supportedPlatforms,
+            bool showAwaitReturn,
+            NullableFlowState flowState,
+            CancellationToken cancellationToken)
         {
             var descriptionService = workspace.Services.GetLanguageServices(semanticModel.Language).GetRequiredService<ISymbolDisplayService>();
             var groups = await descriptionService.ToDescriptionGroupsAsync(workspace, semanticModel, span.Start, symbols, cancellationToken).ConfigureAwait(false);
@@ -65,7 +69,6 @@
             {
                 AddSection(QuickInfoSectionKinds.Description, mainDescriptionTaggedParts);
             }
-

             if (groups.TryGetValue(SymbolDescriptionGroups.Documentation, out var docParts) && !docParts.IsDefaultOrEmpty)
                 AddSection(QuickInfoSectionKinds.DocumentationComments, docParts);


This needs to be a byte

This needs to be a byte

--- PolarisServer/Models/Character.cs
+++ PolarisServer/Models/Character.cs
@@ -23,7 +23,7 @@
             Female
         }

-        public enum ClassType : ushort
+        public enum ClassType : byte
         {
             Hunter = 0,
             Fighter,


fixed event pipeline builder issue

fixed event pipeline builder issue

--- src/Handyman.Mediator/src/Pipeline/EventPipelineFactory.cs
+++ src/Handyman.Mediator/src/Pipeline/EventPipelineFactory.cs
@@ -58,7 +58,7 @@
                 }
                 else if (AttributePipelineBuilders.Count == 0)
                 {
-                    pipelineBuilders = options.EventPipelineBuilders;
+                    pipelineBuilders = options.EventPipelineBuilders.ToList();
                     pipelineBuilders.Sort(PipelineBuilderComparer.Compare);
                 }
                 else


Enhance error handling

Enhance error handling

--- src/HolzShots.Core/Net/Custom/CustomUploaderSpecUpdater.cs
+++ src/HolzShots.Core/Net/Custom/CustomUploaderSpecUpdater.cs
@@ -19,6 +19,7 @@
             int invalidResponse = 0;
             int noUpdateAvailable = 0;
             var availableUpdates = new List<SpecUpdate>();
+            var errors = new List<Exception>();

             foreach (var uploader in uploaders)
             {
@@ -35,22 +36,37 @@
                 using var client = new HttpClient();

                 // TODO: Maybe add a user-agent, so the server knows it's HS requesting
-                var newSpecCandidate = await client.GetStringAsync(updateUrl, cancellationToken);
-                if (newSpecCandidate == null)
+                string newSpecCandidate;
+                try
                 {
-                    ++emptyResponse;
+                    newSpecCandidate = await client.GetStringAsync(updateUrl, cancellationToken);
+                    if (newSpecCandidate == null)
+                    {
+                        ++emptyResponse;
+                        continue;
+                    }
+
+                }
+                catch (OperationCanceledException ex)
+                {
+                    throw;
+                }
+                catch (Exception ex)
+                {
+                    errors.Add(ex);
                     continue;
                 }

                 if (CustomUploader.TryParse(newSpecCandidate, out var parsedUploader))
                 {
                     var newSpec = parsedUploader.UploaderInfo;
-                    if(newSpec != null)
+                    if (newSpec != null)
                     {
-                        if(newSpec.Meta.Version > spec.Meta.Version)
+                        if (newSpec.Meta.Version > spec.Meta.Version)
                         {
                             availableUpdates.Add(new SpecUpdate(filePath, spec, newSpec, newSpecCandidate));
-                        } else
+                        }
+                        else
                         {
                             noUpdateAvailable++;
                         }
@@ -62,15 +78,15 @@
                 }
             }

-            return new UploaderSpecUpdateResult(noUpdateUrl, emptyResponse, invalidResponse, noUpdateAvailable, availableUpdates);
+            return new UploaderSpecUpdateResult(noUpdateUrl, emptyResponse, invalidResponse, noUpdateAvailable, availableUpdates, errors);
         }

-        public Task ApplyUpdate(SpecUpdate update, CancellationToken cancellationToken)
+        public static Task ApplyUpdate(SpecUpdate update, CancellationToken cancellationToken)
         {
             return File.WriteAllTextAsync(update.JsonFilePath, update.NewContents, cancellationToken);
         }

-        public async Task ApplyUpdates(CustomUploaderSource uploaderSpecSource, IReadOnlyList<SpecUpdate> updates, CancellationToken cancellationToken)
+        public static async Task ApplyUpdates(CustomUploaderSource uploaderSpecSource, IReadOnlyList<SpecUpdate> updates, CancellationToken cancellationToken)
         {
             foreach (var update in updates)
                 await ApplyUpdate(update, cancellationToken);
@@ -84,7 +100,8 @@
         int EmptyResponse,
         int InvalidResponse,
         int NoUpdateAvailable,
-        IReadOnlyList<SpecUpdate> AvailableUpdates
+        IReadOnlyList<SpecUpdate> AvailableUpdates,
+        IReadOnlyList<Exception> Errors
     );
     public record SpecUpdate(
         string JsonFilePath,


version 1.7.0

version 1.7.0


IsLoaded check no longer required

IsLoaded check no longer required

--- osu.Game/Overlays/DialogOverlay.cs
+++ osu.Game/Overlays/DialogOverlay.cs
@@ -89,8 +89,7 @@
         {
             base.PopOut();

-            if (IsLoaded)
-                filter.Disable();
+            filter.Disable();

             if (CurrentDialog?.State.Value == Visibility.Visible)
             {


comments

comments

--- NBitcoin.Tests/transaction_tests.cs
+++ NBitcoin.Tests/transaction_tests.cs
@@ -76,28 +76,31 @@
 			var stealthKeys = Enumerable.Range(0, 3).Select(_ => new Key()).ToArray();
 			var scanKey = new Key();

-			var stealthAddress = new BitcoinStealthAddress(scanKey.PubKey, stealthKeys.Select(k => k.PubKey).ToArray(), 2, new BitField(3, 5), Network.Main);
+			var satoshi = new BitcoinStealthAddress(scanKey.PubKey, stealthKeys.Select(k => k.PubKey).ToArray(), 2, new BitField(3, 5), Network.Main);

 			var bob = new Key();
 			var coins = new Coin[] {
-							new Coin()
-							{
-								Outpoint = RandOutpoint(),
-								TxOut = new TxOut("1.00",bob.PubKey.ID)
-							} };
-
+				new Coin()
+				{
+					Outpoint = RandOutpoint(),
+					TxOut = new TxOut("1.00",bob.PubKey.ID)
+				} };
+
+			//Bob send money to satoshi
 			TransactionBuilder builder = new TransactionBuilder();
 			var tx =
 				builder
 				.AddCoins(coins)
 				.AddKeys(bob)
-				.SendTo(stealthAddress, "1.00")
+				.SendTo(satoshi, "1.00")
 				.BuildTransaction(true);
 			Assert.True(builder.Verify(tx));

-			var stealthCoin = StealthCoin.Find(tx, stealthAddress, scanKey);
+			//Satoshi scan a StealthCoin in the transaction with his scan key
+			var stealthCoin = StealthCoin.Find(tx, satoshi, scanKey);
 			Assert.NotNull(stealthCoin);

+			//Satoshi send back the money to Bob
 			builder = new TransactionBuilder();
 			tx =
 				builder
@@ -107,30 +110,33 @@
 					.SendTo(bob.PubKey.ID, "1.00")
 					.BuildTransaction(true);

-			Assert.True(builder.Verify(tx));
-
-			//Testing if partial signing works
+			Assert.True(builder.Verify(tx)); //Signed !
+
+
+			//Same scenario, Satoshi want to send money back to Bob
+			//However, his keys are spread on two machines
+			//He partially sign on the 1st machine
 			builder = new TransactionBuilder();
 			tx =
 				builder
 					.AddCoins(stealthCoin)
-					.AddKeys(stealthKeys.Skip(2).ToArray())
+					.AddKeys(stealthKeys.Skip(2).ToArray()) //Only one Stealth Key
 					.AddKeys(scanKey)
 					.SendTo(bob.PubKey.ID, "1.00")
 					.BuildTransaction(true);

-			//Not fully signed
-			Assert.False(builder.Verify(tx));
-
+			Assert.False(builder.Verify(tx)); //Not fully signed
+
+			//Then he partially sign on the 2nd machine
 			builder = new TransactionBuilder();
 			tx =
 				builder
-					.AddCoins(stealthCoin) //Necessary so builder can verify transaction
-					.AddKeys(stealthKeys[0])
+					.AddCoins(stealthCoin)
+					.AddKeys(stealthKeys[0]) //Other key
 					.AddKeys(scanKey)
 					.SignTransaction(tx);

-			Assert.True(builder.Verify(tx));
+			Assert.True(builder.Verify(tx)); //Fully signed !
 		}

 		private OutPoint RandOutpoint()


Update AssemblyInfo.cs

Update AssemblyInfo.cs

--- NLog.Etw/Properties/AssemblyInfo.cs
+++ NLog.Etw/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("NLog.Etw")]
-[assembly: AssemblyCopyright("Copyright ©  2014")]
+[assembly: AssemblyCopyright("Copyright ©  2014-2015")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]


Fixed bug #5530. `using System;` statement will now only appear once in generated files.

--- NMG.Core/Generator/CodeGenerator.cs
+++ NMG.Core/Generator/CodeGenerator.cs
@@ -196,7 +196,6 @@
             entireContent = "using System; \n" + entireContent;
             entireContent = "using System.Text; \n" + entireContent;
             entireContent = "using System.Collections.Generic; \n" + entireContent;
-            entireContent = "using System; \n" + entireContent;
             return entireContent;
         }


Fix highlighting.

Fix highlighting.

--- Nitra.Visualizer/MainWindow.xaml.cs
+++ Nitra.Visualizer/MainWindow.xaml.cs
@@ -655,7 +655,11 @@
         if (!span.IntersectsWith(_span) || !reference.IsRefEvaluated)
           return;

-        var spanClass = reference.Ref.SpanClass;
+        IRef r = reference.Ref;
+        while (r.IsResolvedToEvaluated)
+          r = r.ResolvedTo;
+
+        var spanClass = r.SpanClass;

         if (spanClass == Nitra.Language.DefaultSpanClass)
           return;


'1.0.274'

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


Added the application version to the css and javascript urls to prevent caching old files.

--- DoctrineShips.Web/Views/Shared/_Layout.cshtml
+++ DoctrineShips.Web/Views/Shared/_Layout.cshtml
@@ -4,7 +4,7 @@
     <meta charset="utf-8" />
     <meta name="viewport" content="width=device-width" />
     <title>@System.Web.HttpContext.Current.Application["Brand"] - @ViewBag.Title</title>
-    <link href="@Url.Content("~/Content/styles/styles.css")" rel="stylesheet" type="text/css" />
+    <link href="@Url.Content("~/Content/styles/styles.css?ver=" + typeof(DoctrineShips.Web.MvcApplication).Assembly.GetName().Version)" rel="stylesheet" type="text/css" />
     <link href="@Url.Content("~/Content/styles/gridmvc.css")" rel="stylesheet" type="text/css" />
     <link rel="shortcut icon" href="~/Content/favicon.ico" />

@@ -32,7 +32,7 @@
         </p>
     </div>

-    <script src="@Url.Content("~/Scripts/doctrineships.js")" type="text/javascript"> </script>
+    <script src="@Url.Content("~/Scripts/doctrineships.js?ver=" + typeof(DoctrineShips.Web.MvcApplication).Assembly.GetName().Version)" type="text/javascript"> </script>
     <script src="@Url.Content("~/Scripts/jquery-1.11.0.min.js")" type="text/javascript"></script>
     <script src="@Url.Content("~/Scripts/gridmvc.min.js")" type="text/javascript"> </script>
     <script src="@Url.Content("~/Scripts/bootstrap.min.js")" type="text/javascript"> </script>


(GH-502) Set configuration during package restore (#503)

(GH-502) Set configuration during package restore

--- Cake.Recipe/Content/build.cake
+++ Cake.Recipe/Content/build.cake
@@ -172,7 +172,8 @@
                             .WithProperty("Version", BuildParameters.Version.SemVersion)
                             .WithProperty("AssemblyVersion", BuildParameters.Version.Version)
                             .WithProperty("FileVersion",  BuildParameters.Version.Version)
-                            .WithProperty("AssemblyInformationalVersion", BuildParameters.Version.InformationalVersion);
+                            .WithProperty("AssemblyInformationalVersion", BuildParameters.Version.InformationalVersion)
+                            .WithProperty("Configuration", BuildParameters.Configuration);

     if (BuildParameters.BuildAgentOperatingSystem != PlatformFamily.Windows)
     {


- Add async ExecuteStoredProc operation - Prepend default schema to storedproc name if defined in dbcontext modelbuilder - Fix commandbehaviour param not being passed to ExecuteReader - Add scalar result reader for 'statuscode' responses

--- EFCoreFluent/src/EFCoreFluent/EFExtensions.cs
+++ EFCoreFluent/src/EFCoreFluent/EFExtensions.cs
@@ -15,12 +15,22 @@
         /// <summary>
         /// Creates an initial DbCommand object based on a stored procedure name
         /// </summary>
-        /// <param name="context"></param>
-        /// <param name="storedProcName"></param>
-        /// <returns></returns>
-        public static DbCommand LoadStoredProc(this DbContext context, string storedProcName)
+        /// <param name="context">target database context</param>
+        /// <param name="storedProcName">target procedure name</param>
+        /// <param name="prependDefaultSchema">Prepend the default schema name to <paramref name="storedProcName"/> if explicitly defined in <paramref name="context"/></param>
+        /// <returns></returns>
+        public static DbCommand LoadStoredProc(this DbContext context, string storedProcName, bool prependDefaultSchema = true)
         {
             var cmd = context.Database.GetDbConnection().CreateCommand();
+            if (prependDefaultSchema)
+            {
+                var schemaName = context.Model.FindAnnotation("Relational:DefaultSchema")?.Value;
+                if (schemaName != null)
+                {
+                    storedProcName = $"{schemaName}.{storedProcName}";
+                }
+
+            }
             cmd.CommandText = storedProcName;
             cmd.CommandType = System.Data.CommandType.StoredProcedure;
             return cmd;
@@ -73,6 +83,11 @@
             public IList<T> ReadToList<T>()
             {
                 return MapToList<T>(_reader);
+            }
+
+            public T? ReadToValue<T>() where T : struct
+            {
+                return MapToValue<T>(_reader);
             }

             public Task<bool> NextResultAsync()
@@ -121,7 +136,20 @@
                 return objList;
             }

-
+            /// <summary>
+            ///Attempts to read the first value of the first row of the resultset.
+            /// </summary>
+            private T? MapToValue<T>(DbDataReader dr) where T : struct
+            {
+                if (dr.HasRows)
+                {
+                    if (dr.Read())
+                    {
+                        return dr.IsDBNull(0) ? new T?() : new T?(dr.GetFieldValue<T>(0));
+                    }
+                }
+                return new T?();
+            }
         }

         /// <summary>
@@ -143,7 +171,7 @@
                     command.Connection.Open();
                 try
                 {
-                    using (var reader = command.ExecuteReader())
+                    using (var reader = command.ExecuteReader(commandBehaviour))
                     {
                         var sprocResults = new SprocResults(reader);
                         // return new SprocResults();
@@ -157,5 +185,36 @@
             }
         }

+        /// <summary>
+        /// Executes a DbDataReader asynchronously and returns a list of mapped column values to the properties of <typeparamref name="T"/>.
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <param name="command"></param>
+        /// <returns></returns>
+        public async static Task ExecuteStoredProcAsync(this DbCommand command, Action<SprocResults> handleResults, System.Data.CommandBehavior commandBehaviour = System.Data.CommandBehavior.Default, CancellationToken ct = default(CancellationToken))
+        {
+            if (handleResults == null)
+            {
+                throw new ArgumentNullException(nameof(handleResults));
+            }
+
+            using (command)
+            {
+                if (command.Connection.State == System.Data.ConnectionState.Closed)
+                    await command.Connection.OpenAsync(ct).ConfigureAwait(false);
+                try
+                {
+                    using (var reader = await command.ExecuteReaderAsync(commandBehaviour, ct).ConfigureAwait(false))
+                    {
+                        var sprocResults = new SprocResults(reader);
+                        handleResults(sprocResults);
+                    }
+                }
+                finally
+                {
+                    command.Connection.Close();
+                }
+            }
+        }
     }
 }


Removed default user creation function.

Removed default user creation function.

--- EdityMcEditface/Controllers/AuthController.cs
+++ EdityMcEditface/Controllers/AuthController.cs
@@ -26,43 +26,43 @@
             this.roleManager = roleManager;
         }

-        [HttpGet]
-        public async Task<IActionResult> CreateUnsafeDefaultUser()
-        {
-            //temp, create the user first
-            var user = new NoSqlUser()
-            {
-                Name = "Anon",
-                Email = "anon@spcollege.edu"
-            };
-            await userManager.CreateAsync(user, "Password@43");
+        //[HttpGet]
+        //public async Task<IActionResult> CreateUnsafeDefaultUser()
+        //{
+        //    //temp, create the user first
+        //    var user = new NoSqlUser()
+        //    {
+        //        Name = "Anon",
+        //        Email = "anon@spcollege.edu"
+        //    };
+        //    await userManager.CreateAsync(user, "Password@43");

-            var claims = new[] {
-                    new Claim(ClaimTypes.Role, Roles.EditPages),
-                    new Claim(ClaimTypes.Role, Roles.Compile),
-                    new Claim(ClaimTypes.Role, Roles.UploadAnything),
-                    new Claim(ClaimTypes.Role, Roles.Shutdown),
-                };
+        //    var claims = new[] {
+        //            new Claim(ClaimTypes.Role, Roles.EditPages),
+        //            new Claim(ClaimTypes.Role, Roles.Compile),
+        //            new Claim(ClaimTypes.Role, Roles.UploadAnything),
+        //            new Claim(ClaimTypes.Role, Roles.Shutdown),
+        //        };

-            await userManager.AddClaimsAsync(user, claims);
+        //    await userManager.AddClaimsAsync(user, claims);

-            var roles = new[] {
-                    Roles.EditPages,
-                    Roles.Compile,
-                    Roles.UploadAnything,
-                    Roles.Shutdown,
-                };
-            await userManager.AddToRolesAsync(user, roles);
+        //    var roles = new[] {
+        //            Roles.EditPages,
+        //            Roles.Compile,
+        //            Roles.UploadAnything,
+        //            Roles.Shutdown,
+        //        };
+        //    await userManager.AddToRolesAsync(user, roles);

-            foreach (var role in roles)
-            {
-                var ourRole = new NoSqlRole(role);
-                await roleManager.CreateAsync(ourRole);
-                await roleManager.UpdateAsync(ourRole);
-            }
-            //end temp
-            return SafeRedirect("/");
-        }
+        //    foreach (var role in roles)
+        //    {
+        //        var ourRole = new NoSqlRole(role);
+        //        await roleManager.CreateAsync(ourRole);
+        //        await roleManager.UpdateAsync(ourRole);
+        //    }
+        //    //end temp
+        //    return SafeRedirect("/");
+        //}

         [HttpGet]
         public async Task<IActionResult> LogIn(String returnUrl)


Intialize ISaslAuthenticator with a UserStore

--- ExoMail.Smtp/Interfaces/ISaslAuthenticator.cs
+++ ExoMail.Smtp/Interfaces/ISaslAuthenticator.cs
@@ -19,6 +19,6 @@
         int Step { get; set; }
         string GetChallenge();
         void ParseResponse(string response);
-        ISaslAuthenticator Create();
+        ISaslAuthenticator Create(IUserStore userStore);
     }
 }


Finished the logic to get the stats of the weeks. ref #16

--- ExpenseManager/ViewModel/ExpenseController.cs
+++ ExpenseManager/ViewModel/ExpenseController.cs
@@ -138,6 +138,28 @@
         }

         /// <summary>
+        /// The method that will return a list with all expenses from last two weeks
+        /// </summary>
+        /// <returns>a list with all expenses from last two weeks</returns>
+        public List<Expense> GetExpensesFromLastTwoWeeks()
+        {
+            List<Expense> expenses = GetAllExpenses();
+            List<Expense> expWeek = new List<Expense>();
+
+            DateTime thisWeek = DateTime.Now.Subtract(new TimeSpan(14, 0, 0, 0));
+
+            foreach (Expense item in expenses)
+            {
+                if (item.date.CompareTo(thisWeek) == 1)
+                {
+                    expWeek.Add(item);
+                }
+            }
+
+            return expWeek;
+        }
+
+        /// <summary>
         /// The method that will return a list with all expenses from last month
         /// </summary>
         /// <returns>a list with all expenses from last month</returns>
@@ -205,7 +227,7 @@
         }

         /// <summary>
-        /// The method that will return the diference between last month and the previous month
+        /// The method that will return the diference between last month and the previous two months
         /// </summary>
         /// <returns>the diference value</returns>
         public double GetMonthStats()
@@ -221,10 +243,24 @@
             return sumLastTwoMonths - 2 * sumLastMonth;
         }

+        /// <summary>
+        /// The method that will return the diference between last week and the previous two weeks
+        /// </summary>
+        /// <returns>the diference value</returns>
         public double GetWeekStats()
         {
-            throw new NotImplementedException();
-        }
+            double sumLastWeek = SumExpenses(GetExpensesFromLastWeek());
+            double sumLastTwoWeeks = SumExpenses(GetExpensesFromLastTwoWeeks());
+
+            if (sumLastTwoWeeks == 0)
+            {
+                return sumLastWeek * -1;
+            }
+
+            return sumLastTwoWeeks - 2 * sumLastWeek;
+        }
+
+

         /// <summary>
         /// The method that will calculate a sum of expenses from a given list


Added a bunch more functions to NetAddress

--- Facepunch.Steamworks/Networking/NetAddress.cs
+++ Facepunch.Steamworks/Networking/NetAddress.cs
@@ -24,25 +24,18 @@
 		}

 		/// <summary>
+		/// The Port. This is redundant documentation.
+		/// </summary>
+		public ushort Port => port;
+
+		/// <summary>
 		/// Any IP, specific port
 		/// </summary>
 		public static NetAddress AnyIp( ushort port )
 		{
-			return new NetAddress
-			{
-				ip = new IPV4
-				{
-					m_8zeros = 0,
-					m_0000 = 0,
-					m_ffff = 0,
-					ip0 = 0,
-					ip1 = 0,
-					ip2 = 0,
-					ip3 = 0,
-				},
-
-				port = port
-			};
+			var addr = Cleared;
+			addr.port = port;
+			return addr;
 		}

 		/// <summary>
@@ -50,21 +43,9 @@
 		/// </summary>
 		public static NetAddress LocalHost( ushort port )
 		{
-			return new NetAddress
-			{
-				ip = new IPV4
-				{
-					m_8zeros = 0,
-					m_0000 = 0,
-					m_ffff = 0,
-					ip0 = 0,
-					ip1 = 0,
-					ip2 = 0,
-					ip3 = 1,
-				},
-
-				port = port
-			};
+			var local = Cleared;
+			InternalSetIPv6LocalHost( ref local, port );
+			return local;
 		}

 		/// <summary>
@@ -82,26 +63,89 @@
 		{
 			var addr = address.GetAddressBytes();

-			if ( addr.Length == 4 )
+			if ( address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork )
 			{
-				return new NetAddress
-				{
-					ip = new IPV4
-					{
-						m_8zeros = 0,
-						m_0000 = 0,
-						m_ffff = 0xffff,
-						ip0 = addr[0],
-						ip1 = addr[1],
-						ip2 = addr[2],
-						ip3 = addr[3],
-					},
-
-					port = port
-				};
+				var local = Cleared;
+				InternalSetIPv4( ref local, Utility.IpToInt32( address ), port );
+				return local;
 			}

 			throw new System.NotImplementedException( "Oops - no IPV6 support yet?" );
 		}
+
+		/// <summary>
+		/// Set everything to zero
+		/// </summary>
+		public static NetAddress Cleared
+		{
+			get
+			{
+				NetAddress self = default;
+				InternalClear( ref self );
+				return self;
+			}
+		}
+
+		/// <summary>
+		/// Return true if the IP is ::0.  (Doesn't check port.)
+		/// </summary>
+		public bool IsIPv6AllZeros
+		{
+			get
+			{
+				NetAddress self = this;
+				return InternalIsIPv6AllZeros( ref self );
+			}
+		}
+
+		/// <summary>
+		/// Return true if IP is mapped IPv4
+		/// </summary>
+		public bool IsIPv4
+		{
+			get
+			{
+				NetAddress self = this;
+				return InternalIsIPv4( ref self );
+			}
+		}
+
+		/// <summary>
+		/// Return true if this identity is localhost.  (Either IPv6 ::1, or IPv4 127.0.0.1)
+		/// </summary>
+		public bool IsLocalHost
+		{
+			get
+			{
+				NetAddress self = this;
+				return InternalIsLocalHost( ref self );
+			}
+		}
+
+		/// <summary>
+		/// Get the Address section
+		/// </summary>
+		public IPAddress Address
+		{
+			get
+			{
+				if ( IsIPv4 )
+				{
+					NetAddress self = this;
+					var ip = InternalGetIPv4( ref self  );
+					return Utility.Int32ToIp( ip );
+				}
+
+				throw new System.NotImplementedException( "Oops - no IPV6 support yet?" );
+			}
+		}
+
+		public override string ToString()
+		{
+			var ptr = Helpers.TakeMemory();
+			var self = this;
+			InternalToString( ref self, ptr, Helpers.MaxStringSize, true );
+			return Helpers.MemoryToString( ptr );
+		}
 	}
 }


/gamemode command now can accept a single argument

--- Chraft/Commands/CmdGameMode.cs
+++ Chraft/Commands/CmdGameMode.cs
@@ -40,6 +40,23 @@
                 case 0:
                     ChangeGameMode(client, client.Owner.GameMode == 0 ? 1 : 0);
                     break;
+                case 1:
+                    byte gm;
+                    if (byte.TryParse(tokens[0], out gm) && (gm == 0 || gm == 1))
+                    {
+                        if (client.Owner.GameMode == gm)
+                        {
+                            client.SendMessage(ChatColor.Red + "You are already in that mode");
+                            break;
+                        }
+                        ChangeGameMode(client, gm);
+                    }
+                    else
+                    {
+                        Help(client);
+                        break;
+                    }
+                    break;
                 case 2:
                     if (Int32.Parse(tokens[1]) != 0)
                     {
@@ -79,7 +96,7 @@

         public void Help(IClient client)
         {
-            (client as Client).SendMessage("/gamemode <player> [0|1]");
+            (client as Client).SendMessage("/gamemode [player] [0|1]");
         }

         public string Name


Ignore exceptions when setting SIO_UDP_CONNRESET

It might cause "SocketException: The descriptor is not a socket" on Mono.

--- CoAP.NET/Channel/UDPChannel.cs
+++ CoAP.NET/Channel/UDPChannel.cs
@@ -296,7 +296,14 @@

             // do not throw SocketError.ConnectionReset by ignoring ICMP Port Unreachable
             const Int32 SIO_UDP_CONNRESET = -1744830452;
-            socket.Socket.IOControl(SIO_UDP_CONNRESET, new Byte[] { 0 }, null);
+            try
+            {
+                socket.Socket.IOControl(SIO_UDP_CONNRESET, new Byte[] { 0 }, null);
+            }
+            catch (Exception e)
+            {
+                // ignore
+            }
             return socket;
         }


HttpEndpoint sample : MouseStats refactoring.

--- Framework/Snippets/HttpEndpoint/MouseStats.cs
+++ Framework/Snippets/HttpEndpoint/MouseStats.cs
@@ -16,25 +16,34 @@
         public int MessagesPerSecond { get; set; }
         public long Distance { get; set; }

-        readonly int[] _circularBuffer = new int[60];
+        int _messageCounter;
+        int _currentSecond;

         public void RecordMessage()
         {
-            _circularBuffer[DateTime.Now.Second] += 1;
+            var second = DateTime.Now.Second;
+
+            if (second == _currentSecond)
+            {
+                _messageCounter += 1;
+            }
+            else
+            {
+                _currentSecond = second;
+                MessagesPerSecond = _messageCounter;
+                _messageCounter = 1;
+            }
         }

         public void RefreshStatistics()
         {
-            // clears the opposite side of the message count tracking
-            // buffer
-            var offset = DateTime.Now.Second;
-            for (int i = 0; i < 20; i++)
-            {
-                var loc = (offset + 20) % 60;
-                _circularBuffer[loc] = 0;
-            }
+            var second = DateTime.Now.Second;
+            if (second == _currentSecond) return;

-            MessagesPerSecond = _circularBuffer[offset - 1];
+            _currentSecond = second;
+            MessagesPerSecond = _messageCounter;
+            _messageCounter = 0;
+
         }
     }
 }


even more logging!

even more logging!

--- Cobalt.Engine/SystemWatcher.cs
+++ Cobalt.Engine/SystemWatcher.cs
@@ -41,11 +41,18 @@
                 if (_prevMonitorOn == monitorOn) return;

                 Log.Information("Monitor State Changed: {reason}", monitorOn ? "on" : "off");
+                LogEnv();
                 RaiseSystemMainStateChanged(monitorOn ? SystemStateChange.MonitorOn : SystemStateChange.MonitorOff);
                 _prevMonitorOn = monitorOn;
             });

             Log.Information("Session SessionStart!");
+        }
+
+        private void LogEnv()
+        {
+            Log.Information("");
+            Log.Information("ENV: shutdown started: {s}, ", Environment.HasShutdownStarted);
         }

         public event EventHandler<SystemStateChangedArgs> SystemMainStateChanged = delegate { };
@@ -64,6 +71,7 @@

         private void SessionEnded(object sender, SessionEndedEventArgs e)
         {
+                LogEnv();
             Log.Information("Session Ending, Reason: {reason}", e.Reason);
             if (e.Reason == SessionEndReasons.Logoff)
                 RaiseSystemMainStateChanged(SystemStateChange.Logoff);
@@ -73,6 +81,7 @@

         private void PowerModeChanged(object sender, PowerModeChangedEventArgs e)
         {
+                LogEnv();
             Log.Information("Power Mode Changed, Reason: {reason}", e.Mode);
             //TODO buggy: Sleep is called after monitoroff when device is going to sleep
             /*


Added ability to set CallerId for almost all cmdlets.

--- Handy.Crm.Powershell.Cmdlets/CrmCmdletBase.cs
+++ Handy.Crm.Powershell.Cmdlets/CrmCmdletBase.cs
@@ -1,4 +1,5 @@
-using System.Management.Automation;
+using System;
+using System.Management.Automation;
 using Microsoft.Xrm.Client;
 using Microsoft.Xrm.Client.Services;

@@ -15,12 +16,22 @@
 		[ValidateNotNull]
 		public CrmConnection Connection { get; set; }

+		[Parameter(
+			Mandatory = false)]
+		[ValidateNotNull]
+		public Guid CallerId { get; set; }
+
 		protected override void BeginProcessing()
 		{
 			base.BeginProcessing();

+			CrmConnection crmConnection = Connection ?? GetConnectionFromPSVariable(GlobalConnectionVariableName);
+
+			if (CallerId != default(Guid))
+				crmConnection.CallerId = CallerId;
+
 			WriteVerbose("Creating OrganizationService");
-			organizationService = new OrganizationService(Connection ?? GetConnectionFromPSVariable(GlobalConnectionVariableName));
+			organizationService = new OrganizationService(crmConnection);
 		}

 		protected override void EndProcessing()
@@ -31,19 +42,19 @@
 			base.EndProcessing();
 		}

-		private CrmConnection GetConnectionFromPSVariable(string VariableName)
+		private CrmConnection GetConnectionFromPSVariable(string variableName)
 		{
-			WriteVerbose(string.Format("Getting connection from global variable '{0}'.", VariableName));
+			WriteVerbose(string.Format("Getting connection from global variable '{0}'.", variableName));

-			var psobj = SessionState.PSVariable.GetValue(string.Format("global:{0}", VariableName), null);
+			var psobj = SessionState.PSVariable.GetValue(string.Format("global:{0}", variableName), null);

 			if (psobj == null)
-				throw new PSArgumentNullException(VariableName, string.Format("Couldn't find global variable '{0}'.", VariableName));
+				throw new PSArgumentNullException(variableName, string.Format("Couldn't find global variable '{0}'.", variableName));

 			var connectionobj = psobj.UnwrapPSObject();

 			if (!(connectionobj is Microsoft.Xrm.Client.CrmConnection))
-				throw new PSArgumentException(string.Format("Variable '{0}' isn't an instance of Microsoft.Xrm.Client.CrmConnection.", VariableName), VariableName);
+				throw new PSArgumentException(string.Format("Variable '{0}' isn't an instance of Microsoft.Xrm.Client.CrmConnection.", variableName), variableName);

 			return (CrmConnection)connectionobj;
 		}


Change assertion method

Change assertion method

--- HarmonyTests/Extras/RetrieveOriginalMethod.cs
+++ HarmonyTests/Extras/RetrieveOriginalMethod.cs
@@ -32,7 +32,7 @@
 			{
 				var original = Harmony.GetOriginalMethod(replacement);
 				Assert.NotNull(original);
-				Assert.Equals(original, AccessTools.Method(typeof(RetrieveOriginalMethod), nameof(RetrieveOriginalMethod.PatchTarget)));
+				Assert.AreEqual(original, AccessTools.Method(typeof(RetrieveOriginalMethod), nameof(RetrieveOriginalMethod.PatchTarget)));
 			}
 		}


Add missing semicolon and fix indentation

--- AGXUnity/Simulation.cs
+++ AGXUnity/Simulation.cs
@@ -18,7 +18,7 @@
     /// </summary>
     private agxSDK.Simulation m_simulation = null;

-	public bool EnableAutomaticStepping = true;
+    public bool EnableAutomaticStepping = true;

     public static float DefaultTimeStep { get { return Time.fixedDeltaTime; } }

@@ -157,7 +157,7 @@
     private void FixedUpdate()
     {
       if (EnableAutomaticStepping)
-    	DoStep()
+    	DoStep();
     }

     public void DoStep()


Localtime fixes

Localtime fixes

--- Illias/ExtensionMethods/DateTimeExtensions.cs
+++ Illias/ExtensionMethods/DateTimeExtensions.cs
@@ -82,6 +82,25 @@

         #endregion

+        #region ToIso8601WithOffset(this DateTime, Fractions = true)
+
+        /// <summary>
+        /// Convert the given DateTime object to an ISO 8601 datetime string with timezone offset.
+        /// </summary>
+        /// <param name="DateTime">A DateTime object.</param>
+        /// <param name="Fractions">Iclude the fractions of seconds.</param>
+        /// <returns>The DateTime formated as "yyyy-MM-ddTHH:mm:ss.fffzzz"</returns>
+        /// <example>2014-02-01T15:45:00.000+00:00</example>
+        public static String ToIso8601WithOffset(this DateTime DateTime, Boolean Fractions = true)
+
+            => (DateTime.Kind == DateTimeKind.Utc
+                    ? DateTime.ToLocalTime()
+                    : DateTime).
+
+                ToString("yyyy-MM-ddTHH:mm:ss" + (Fractions ? ".fff" : "") + "zzz");
+
+        #endregion
+
         #region ToRfc1123(this DateTime)

         /// <summary>


doco and spaces instead of tabs

doco and spaces instead of tabs

--- src/net35/Radical/ComponentModel/Container/IPuzzleContainer.cs
+++ src/net35/Radical/ComponentModel/Container/IPuzzleContainer.cs
@@ -4,82 +4,98 @@

 namespace Topics.Radical.ComponentModel
 {
-	/// <summary>
-	/// Defines the contract of the Puzzle Inversion of Control container.
-	/// </summary>
-	public interface IPuzzleContainer : IDisposable
-	{
-		/// <summary>
-		/// Occurs when a component is registered in this container.
-		/// </summary>
-		event EventHandler<ComponentRegisteredEventArgs> ComponentRegistered;
+    /// <summary>
+    /// Defines the contract of the Puzzle Inversion of Control container.
+    /// </summary>
+    public interface IPuzzleContainer : IDisposable
+    {
+        /// <summary>
+        /// Occurs when a component is registered in this container.
+        /// </summary>
+        event EventHandler<ComponentRegisteredEventArgs> ComponentRegistered;

-		/// <summary>
-		/// Adds the given facility instance to this container.
-		/// </summary>
-		/// <param name="facility">The facility.</param>
-		/// <returns>This container instance.</returns>
-		IPuzzleContainer AddFacility( IPuzzleContainerFacility facility );
+        /// <summary>
+        /// Adds the given facility instance to this container.
+        /// </summary>
+        /// <param name="facility">The facility.</param>
+        /// <returns>This container instance.</returns>
+        IPuzzleContainer AddFacility( IPuzzleContainerFacility facility );

-		/// <summary>
-		/// Adds a new facility.
-		/// </summary>
-		/// <typeparam name="TFacility">The type of the facility.</typeparam>
-		/// <returns>This container instance.</returns>
-		IPuzzleContainer AddFacility<TFacility>() where TFacility : IPuzzleContainerFacility;
+        /// <summary>
+        /// Adds a new facility.
+        /// </summary>
+        /// <typeparam name="TFacility">The type of the facility.</typeparam>
+        /// <returns>This container instance.</returns>
+        IPuzzleContainer AddFacility<TFacility>() where TFacility : IPuzzleContainerFacility;

-		/// <summary>
-		/// Registers all the specified entries.
-		/// </summary>
-		/// <param name="entries">The entries to register.</param>
-		/// <returns>This container instance.</returns>
-		IPuzzleContainer Register( IEnumerable<IContainerEntry> entries );
+        /// <summary>
+        /// Registers all the specified entries.
+        /// </summary>
+        /// <param name="entries">The entries to register.</param>
+        /// <returns>This container instance.</returns>
+        IPuzzleContainer Register( IEnumerable<IContainerEntry> entries );

-		/// <summary>
-		/// Registers the specified entry in this container.
-		/// </summary>
-		/// <param name="entry">The entry to register.</param>
-		/// <returns>This container instance.</returns>
-		IPuzzleContainer Register( IContainerEntry entry );
+        /// <summary>
+        /// Registers the specified entry in this container.
+        /// </summary>
+        /// <param name="entry">The entry to register.</param>
+        /// <returns>This container instance.</returns>
+        IPuzzleContainer Register( IContainerEntry entry );

-		/// <summary>
-		/// Determines whether the given service type is registered.
-		/// </summary>
-		/// <typeparam name="TService">The type of the service.</typeparam>
-		/// <returns>
-		/// 	<c>true</c> if the given service type is registered; otherwise, <c>false</c>.
-		/// </returns>
-		Boolean IsRegistered<TService>();
+        /// <summary>
+        /// Determines whether the given service type is registered.
+        /// </summary>
+        /// <typeparam name="TService">The type of the service.</typeparam>
+        /// <returns>
+        /// 	<c>true</c> if the given service type is registered; otherwise, <c>false</c>.
+        /// </returns>
+        Boolean IsRegistered<TService>();

-		/// <summary>
-		/// Determines whether the given service type is registered.
-		/// </summary>
-		/// <param name="serviceType">The type of the service.</param>
-		/// <returns>
-		/// 	<c>true</c> if the given service type is registered; otherwise, <c>false</c>.
-		/// </returns>
-		Boolean IsRegistered( Type serviceType );
+        /// <summary>
+        /// Determines whether the given service type is registered.
+        /// </summary>
+        /// <param name="serviceType">The type of the service.</param>
+        /// <returns>
+        /// 	<c>true</c> if the given service type is registered; otherwise, <c>false</c>.
+        /// </returns>
+        Boolean IsRegistered( Type serviceType );

-		/// <summary>
-		/// Resolves the specified service type.
-		/// </summary>
-		/// <param name="serviceType">The Type of the service.</param>
-		/// <returns>The resolved service instance.</returns>
-		Object Resolve( Type serviceType );
+        /// <summary>
+        /// Resolves the specified service type.
+        /// </summary>
+        /// <param name="serviceType">The Type of the service.</param>
+        /// <returns>The resolved service instance.</returns>
+        Object Resolve( Type serviceType );

-		Object Resolve( String key, Type serviceType );
+        /// <summary>
+        /// Resolves the entry identified by the specified key and with the given type.
+        /// </summary>
+        /// <param name="key">The key.</param>
+        /// <param name="serviceType">Type of the service.</param>
+        /// <returns></returns>
+        Object Resolve( String key, Type serviceType );

-		IEnumerable<T> ResolveAll<T>();
+        /// <summary>
+        /// Resolves all entries of the given type.
+        /// </summary>
+        /// <typeparam name="T">The type of entry to resolve.</typeparam>
+        /// <returns></returns>
+        IEnumerable<T> ResolveAll<T>();

-		IEnumerable<Object> ResolveAll( Type t );
+        /// <summary>
+        /// Resolves all entries of the given type.
+        /// </summary>
+        /// <param name="t">The type of entry to resolve.</param>
+        /// <returns></returns>
+        IEnumerable<Object> ResolveAll( Type t );

-		/// <summary>
-		/// Resolves the specified service type.
-		/// </summary>
-		/// <typeparam name="TService">The type of the service.</typeparam>
-		/// <returns>The resolved service instance.</returns>
-		TService Resolve<TService>();
+        /// <summary>
+        /// Resolves the specified service type.
+        /// </summary>
+        /// <typeparam name="TService">The type of the service.</typeparam>
+        /// <returns>The resolved service instance.</returns>
+        TService Resolve<TService>();

-		//void SetupWith( Func<IEnumerable<Type>> knownTypesProvider, params IPuzzleSetupDescriptor[] descriptors );
-	}
+        //void SetupWith( Func<IEnumerable<Type>> knownTypesProvider, params IPuzzleSetupDescriptor[] descriptors );
+    }
 }


Throw an exception from Tokenizer if no input was provided

--- squirrel/Tokenizer.cs
+++ squirrel/Tokenizer.cs
@@ -14,6 +14,10 @@
         public Tokenizer(string text)
         {
             _text = text;
+            if (string.IsNullOrEmpty(_text))
+            {
+                throw new TokenizerException("no input provided");
+            }
             _current = _text[_offset];
             _next = Peek();
         }


Removed erroneous string Type in LogLog.Warn message.

git-svn-id: 223c0ba935819ffdcafdc68147dc609b4e469b1e@607518 13f79535-47bb-0310-9956-ffa450edef68

--- src/Appender/AppenderSkeleton.cs
+++ src/Appender/AppenderSkeleton.cs
@@ -132,7 +132,7 @@
 					{
 						// We do not throw exception here since the cause is probably a
 						// bad config file.
-						LogLog.Warn(declaringType, "AppenderSkeleton: You have tried to set a null error-handler.");
+						LogLog.Warn(declaringType, "You have tried to set a null error-handler.");
 					}
 					else
 					{


Updated doc comments

Updated doc comments

git-svn-id: 223c0ba935819ffdcafdc68147dc609b4e469b1e@312266 13f79535-47bb-0310-9956-ffa450edef68

--- src/Appender/RemotingAppender.cs
+++ src/Appender/RemotingAppender.cs
@@ -51,12 +51,11 @@
 	/// number of non obvious reasons. The remoting infrastructure will
 	/// flow thread local variables (stored in the <see cref="CallContext"/>),
 	/// if they are marked as <see cref="ILogicalThreadAffinative"/>, across the
-	/// remoting boundary. This means that a large amount of unnecessary data could
-	/// be flowed across the remoting boundary. If the server is not contactable then
+	/// remoting boundary. If the server is not contactable then
 	/// the remoting infrastructure will clear the <see cref="ILogicalThreadAffinative"/>
 	/// objects from the <see cref="CallContext"/>. To prevent a logging failure from
 	/// having side effects on the calling application the remoting call must be made
-	/// from a separate thread to the use used by the application. A <see cref="ThreadPool"/>
+	/// from a separate thread to the one used by the application. A <see cref="ThreadPool"/>
 	/// thread is used for this. If no <see cref="ThreadPool"/> thread is available then
 	/// the events will block in the thread pool manager until a thread is available.</para>
 	/// <para>
@@ -161,12 +160,11 @@
 		/// This is very important for a number of non obvious reasons. The remoting
 		/// infrastructure will flow thread local variables (stored in the <see cref="CallContext"/>),
 		/// if they are marked as <see cref="ILogicalThreadAffinative"/>, across the
-		/// remoting boundary. This means that a large amount of unnecessary data could
-		/// be flowed across the remoting boundary. If the server is not contactable then
+		/// remoting boundary. If the server is not contactable then
 		/// the remoting infrastructure will clear the <see cref="ILogicalThreadAffinative"/>
 		/// objects from the <see cref="CallContext"/>. To prevent a logging failure from
 		/// having side effects on the calling application the remoting call must be made
-		/// from a separate thread to the use used by the application. A <see cref="ThreadPool"/>
+		/// from a separate thread to the one used by the application. A <see cref="ThreadPool"/>
 		/// thread is used for this. If no <see cref="ThreadPool"/> thread is available then
 		/// the events will block in the thread pool manager until a thread is available.
 		/// </remarks>


add fallback for serial port lister

add fallback for serial port lister

see #93

--- OpenCNCPilot/SettingsWindow.xaml.cs
+++ OpenCNCPilot/SettingsWindow.xaml.cs
@@ -1,4 +1,6 @@
 using System;
+using System.Collections.Generic;
+using System.IO.Ports;
 using System.Management;
 using System.Windows;
 using System.Windows.Controls;
@@ -21,6 +23,8 @@
 		{
 			ComboBoxSerialPort.Items.Clear();

+			Dictionary<string, string> ports = new Dictionary<string, string>();
+
 			try
 			{
 				ManagementObjectSearcher searcher = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_SerialPort");
@@ -29,12 +33,26 @@
 					string id = queryObj["DeviceID"] as string;
 					string name = queryObj["Name"] as string;

-					ComboBoxSerialPort.Items.Add(new ComboBoxItem() { Content = name, Tag = id });
+					ports.Add(id, name);
 				}
 			}
 			catch (ManagementException ex)
 			{
 				MessageBox.Show("An error occurred while querying for WMI data: " + ex.Message);
+			}
+
+			// fix error of some boards not being listed properly
+			foreach (string port in SerialPort.GetPortNames())
+			{
+				if (!ports.ContainsKey(port))
+				{
+					ports.Add(port, port);
+				}
+			}
+
+			foreach (var port in ports)
+			{
+				ComboBoxSerialPort.Items.Add(new ComboBoxItem() { Content = port.Value, Tag = port.Key });
 			}
 		}


* Cleaned up the magic UUID definitions in AvatarWearable.cs

--- OpenSim/Framework/AvatarWearable.cs
+++ OpenSim/Framework/AvatarWearable.cs
@@ -34,8 +34,23 @@
 {
     public class AvatarWearable
     {
-        public UUID AssetID = new UUID("00000000-0000-0000-0000-000000000000");
-        public UUID ItemID = new UUID("00000000-0000-0000-0000-000000000000");
+        public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
+        public static readonly UUID DEFAULT_BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
+
+        public static readonly UUID DEFAULT_HAIR_ITEM = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66");
+        public static readonly UUID DEFAULT_HAIR_ASSET = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66");
+
+        public static readonly UUID DEFAULT_SKIN_ITEM = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");
+        public static readonly UUID DEFAULT_SKIN_ASSET = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb");
+
+        public static readonly UUID DEFAULT_SHIRT_ITEM = new UUID("77c41e39-38f9-f75a-0000-585989bf0000");
+        public static readonly UUID DEFAULT_SHIRT_ASSET = new UUID("00000000-38f9-1111-024e-222222111110");
+
+        public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
+        public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120");
+
+        public UUID AssetID;
+        public UUID ItemID;

         public AvatarWearable()
         {
@@ -58,24 +73,24 @@
                 }

                 // Body
-                defaultWearables[0].ItemID  = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9");
-                defaultWearables[0].AssetID = new UUID("66c41e39-38f9-f75a-024e-585989bfab73");
+                defaultWearables[0].ItemID  = DEFAULT_BODY_ITEM;
+                defaultWearables[0].AssetID = DEFAULT_BODY_ASSET;

                 // Hair
-                defaultWearables[2].ItemID  = new UUID("d342e6c1-b9d2-11dc-95ff-0800200c9a66");
-                defaultWearables[2].AssetID = new UUID("d342e6c0-b9d2-11dc-95ff-0800200c9a66");
+                defaultWearables[2].ItemID  = DEFAULT_HAIR_ITEM;
+                defaultWearables[2].AssetID = DEFAULT_HAIR_ASSET;

                 // Skin
-                defaultWearables[1].ItemID  = new UUID("77c41e39-38f9-f75a-024e-585989bfabc9");
-                defaultWearables[1].AssetID = new UUID("77c41e39-38f9-f75a-024e-585989bbabbb");
+                defaultWearables[1].ItemID  = DEFAULT_SKIN_ITEM;
+                defaultWearables[1].AssetID = DEFAULT_SKIN_ASSET;

                 // Shirt
-                defaultWearables[4].ItemID  = new UUID("77c41e39-38f9-f75a-0000-585989bf0000");
-                defaultWearables[4].AssetID = new UUID("00000000-38f9-1111-024e-222222111110");
+                defaultWearables[4].ItemID  = DEFAULT_SHIRT_ITEM;
+                defaultWearables[4].AssetID = DEFAULT_SHIRT_ASSET;

                 // Pants
-                defaultWearables[5].ItemID  = new UUID("77c41e39-38f9-f75a-0000-5859892f1111");
-                defaultWearables[5].AssetID = new UUID("00000000-38f9-1111-024e-222222111120");
+                defaultWearables[5].ItemID  = DEFAULT_PANTS_ITEM;
+                defaultWearables[5].AssetID = DEFAULT_PANTS_ASSET;

                 return defaultWearables;
             }


New overload for DateRangeIncludes() that accepts all params as nullables

--- PART/Source/Core/Utilities/Dates.cs
+++ PART/Source/Core/Utilities/Dates.cs
@@ -68,5 +68,23 @@
             }
             return false;
         }
+
+        public static bool DateRangeIncludes(DateTime? startDate, DateTime? endDate, DateTime? effectDate)
+        {
+            if (startDate.HasValue && endDate.HasValue && startDate.Value > endDate.Value)
+            {
+                throw new ArgumentException(string.Format("startDate <{0}> must me less than or equal o endDate <{1}>", startDate, endDate));
+            }
+            if (!effectDate.HasValue)
+            {
+                return true;
+            }
+            else
+            {
+                var startDateRange = !startDate.HasValue || startDate.Value <= effectDate.Value;
+                var endDateRange = !endDate.HasValue || endDate.Value >= effectDate.Value;
+                return startDateRange && endDateRange;
+            }
+        }
     }
 }


Improve pluralizer

Improve pluralizer

--- Rant/Formats/EnglishPluralizer.cs
+++ Rant/Formats/EnglishPluralizer.cs
@@ -41,26 +41,25 @@
 				{ 'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z' });

 		private static readonly HashSet<char> hardConsonants =
-			new HashSet<char>(new[] { 'b', 'c', 'd', 'f', 'g', 'j', 'm', 'q', 's', 'v', 'x', 'z' });
+			new HashSet<char>(new[] { 'j', 's', 'x', 'z' });
+
+		private static readonly HashSet<string> compounds =
+			new HashSet<string>(new[] {
+				" of staff",
+				"-in-law"
+			});

 		private static readonly Dictionary<string, string> irregulars =
 			new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase)
 			{
 				{ "man", "men" },
+				{ "safe", "safes" },
 				{ "foot", "feet" },
 				{ "tooth", "teeth" },
 				{ "antenna", "antennae" },
 				{ "thesis", "theses" },
 				{ "axis", "axes" },
 				{ "basis", "bases" },
-				{ "leaf", "leaves" },
-				{ "calf", "calves" },
-				{ "knife", "knives" },
-				{ "life", "lives" },
-				{ "dwarf", "dwarves" },
-				{ "wolf", "wolves" },
-				{ "hoof", "hooves" },
-				{ "elf", "elves" },
 				{ "goose", "geese" },
 				{ "louse", "lice" },
 				{ "mouse", "mice" },
@@ -73,6 +72,8 @@
 				{ "criterion", "criteria" },
 				{ "passerby", "passersby" },
 				{ "ox", "oxen" },
+				{ "fox", "foxes" },
+				{ "piano", "pianos" },
 				{ "alumnus", "alumni" },
 				{ "cactus", "cacti" },
 				{ "fungus", "fungi" },
@@ -80,7 +81,18 @@
 				{ "nucleus", "nuclei" },
 				{ "radius", "radii" },
 				{ "stimulus", "stimuli" },
-				{ "child", "children" }
+				{ "child", "children" },
+				{ "pro", "pros" },
+				{ "zero", "zeros" },
+				{ "photo", "photos" },
+				{ "kimono", "kimonos" },
+				{ "canto", "cantos" },
+				{ "hetero", "heteros" },
+				{ "crisis", "crises" },
+				{ "testis", "testes" },
+				{ "nemesis", "nemeses" },
+				{ "genesis", "geneses" },
+				{ "matrix", "matrices" }
 			};

 		private static readonly HashSet<string> ignore = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase)
@@ -122,19 +134,25 @@
 			if ((result = irregulars.Keys.FirstOrDefault(w => input.EndsWith(w))) != null)
 				return input.Substring(0, l - result.Length) + irregulars[result];

+			if (input.EndsWith("ff")) return input + "s";
+
+			if (input[l - 1] == 'f') return input.Substring(0, l - 1) + "ves";
+
+			if (input.EndsWith("fe")) return input.Substring(0, l - 2) + "ves";
+
 			if (consonants.Contains(input[l - 2]))
 			{
 				// With nouns ending in o preceded by a consonant, the plural in many cases is spelled by adding -es...
 				if (input.EndsWith("o")) return input + "es";

 				// Nouns ending in a y preceded by a consonant usually drop the y and add -ies...
-				if (input.EndsWith("y") || input.EndsWith("quy")) return input.Substring(0, l - 1) + "ies";
+				if (input.EndsWith("y")) return input.Substring(0, l - 1) + "ies";
 			}

 			// Plurals of words ending in "man" end in "men"
 			if (input.EndsWith("man")) return input.Substring(0, l - 2) + "en";

-			// Add -es to words ending in a hard consonant
+			// Add -es to words ending in a hard consonant or fricative
 			if (input.EndsWith("ch") || input.EndsWith("sh") || hardConsonants.Contains(input[l - 1])) return input + "es";

 			// Default


Some useful constants are added

Some useful constants are added

--- RationalNumbers/RationalNumber.cs
+++ RationalNumbers/RationalNumber.cs
@@ -7,6 +7,23 @@
     /// </summary>
     public struct RationalNumber : IEquatable<RationalNumber>, IComparable<RationalNumber>
     {
+        /// <summary>
+        /// Zero value.
+        /// </summary>
+        public static readonly RationalNumber Zero = new RationalNumber(0, 1);
+        /// <summary>
+        /// One value.
+        /// </summary>
+        public static readonly RationalNumber One = new RationalNumber(1, 1);
+        /// <summary>
+        /// Maximum value.
+        /// </summary>
+        public static readonly RationalNumber MaxValue = new RationalNumber(long.MaxValue, 1);
+        /// <summary>
+        /// Minimum value.
+        /// </summary>
+        public static readonly RationalNumber MinValue = new RationalNumber(long.MinValue + 1, 1);
+
         /// <summary>
         /// Numerator of value.
         /// </summary>


Fixing style issues

Fixing style issues

--- src/NuGetMirror/NupkgsCommand.cs
+++ src/NuGetMirror/NupkgsCommand.cs
@@ -76,7 +76,7 @@

                 if (delay.HasValue())
                 {
-                    if (Int32.TryParse(delay.Value(), out int x))
+                    if (int.TryParse(delay.Value(), out int x))
                     {
                         var delayMinutes = Math.Max(0, x);
                         delayTime = TimeSpan.FromMinutes(delayMinutes);
@@ -91,7 +91,7 @@

                 if (maxThreadsOption.HasValue())
                 {
-                    if (Int32.TryParse(maxThreadsOption.Value(), out int x))
+                    if (int.TryParse(maxThreadsOption.Value(), out int x))
                     {
                         maxThreads = Math.Max(1, x);
                     }
@@ -106,7 +106,7 @@
                 var root = new DirectoryInfo(outputPath);
                 root.Create();

-                FileInfo outputFilesInfo = new FileInfo(Path.Combine(root.FullName, "updatedFiles.txt"));
+                var outputFilesInfo = new FileInfo(Path.Combine(root.FullName, "updatedFiles.txt"));
                 FileUtility.Delete(outputFilesInfo.FullName);

                 var useV3Format = true;
@@ -268,7 +268,7 @@
                                 log.LogMinimal($"Batch time:\t\t{batchTimer.Elapsed}");
                                 log.LogMinimal($"Updating cursor.json:\t{newestCommit.Value.ToString("o")}");

-                                double rate = batchTimer.Elapsed.TotalSeconds / Math.Max(1, done.Count);
+                                var rate = batchTimer.Elapsed.TotalSeconds / Math.Max(1, done.Count);
                                 var timeLeft = TimeSpan.FromSeconds(rate * (total - complete));

                                 var timeLeftString = string.Empty;
@@ -472,7 +472,7 @@
             };

             // Retry up to 10 times.
-            for (int i = 0; !success && i < 10 && !token.IsCancellationRequested; i++)
+            for (var i = 0; !success && i < 10 && !token.IsCancellationRequested; i++)
             {
                 try
                 {


Fixes issue #110 - Trigger log messages appear multiple times after stopping and starting a controller

--- src/Lithnet.Miiserver.AutoSync/MAInterface/MAController.cs
+++ src/Lithnet.Miiserver.AutoSync/MAInterface/MAController.cs
@@ -376,6 +376,8 @@
                 {
                     this.LogInfo($"Unregistering execution trigger '{t.DisplayName}'");
                     t.TriggerFired -= this.NotifierTriggerFired;
+                    t.Message -= this.NotifierTriggerMessage;
+                    t.Error -= this.NotifierTriggerError;
                     t.Stop();
                 }
                 catch (OperationCanceledException)


Added tests to verify issue #93

Added tests to verify issue #93

--- AngleSharp.Core.Tests/Css/CssSheet.cs
+++ AngleSharp.Core.Tests/Css/CssSheet.cs
@@ -30,6 +30,37 @@
             Assert.AreEqual("h1", h1.SelectorText);
             Assert.AreEqual("rgb(255, 0, 0)", h1.Style.Color);
             Assert.AreEqual("bold", h1.Style.FontWeight);
+        }
+
+        [Test]
+        public void CssSheet1WithDoubleMarkedCommentFromIssue93()
+        {
+            var sheet = ParseStyleSheet(@"
+            /**special css**/
+            .dis-none { display: none;}
+            .dis { display: block; }
+            /*common css*/
+            .dis2 { display: block; }
+            ");
+            var css = sheet.CssText;
+            Assert.AreEqual(3, sheet.Rules.Length);
+            Assert.AreEqual(".dis-none { display: none; }", sheet.Rules[0].CssText);
+            Assert.AreEqual(".dis { display: block; }", sheet.Rules[1].CssText);
+            Assert.AreEqual(".dis2 { display: none; }", sheet.Rules[2].CssText);
+        }
+
+        [Test]
+        public void CssSheet2WithDoubleMarkedCommentFromIssue93()
+        {
+            var sheet = ParseStyleSheet(@"
+            /**special css**/
+            .dis-none { display: none;}
+            .dis { display: block; }
+            ");
+            var css = sheet.CssText;
+            Assert.AreEqual(2, sheet.Rules.Length);
+            Assert.AreEqual(".dis-none { display: none; }", sheet.Rules[0].CssText);
+            Assert.AreEqual(".dis { display: block; }", sheet.Rules[1].CssText);
         }

         [Test]


Plaintext implementation, and FormDataSetEntry abstracted

--- AngleSharp/DOM/Objects/FormDataSet.cs
+++ AngleSharp/DOM/Objects/FormDataSet.cs
@@ -23,7 +23,7 @@

         public FormDataSet()
         {
-            _boundary = String.Concat("<-----?", Guid.NewGuid().ToString(), "?----->");
+            _boundary = Guid.NewGuid().ToString();
             _entries = new List<FormDataSetEntry>();
         }

@@ -48,20 +48,58 @@
         /// http://www.w3.org/html/wg/drafts/html/master/forms.html#multipart/form-data-encoding-algorithm
         /// </summary>
         /// <param name="encoding">(Optional) Explicit encoding.</param>
-        /// <returns></returns>
+        /// <returns>A stream containing the body.</returns>
         public Stream AsMultipart(Encoding encoding = null)
+        {
+            encoding = encoding ?? Encoding.UTF8;
+            var ms = new MemoryStream();
+            CheckBoundaries(encoding);
+            ReplaceCharset(encoding);
+
+            using (var tw = new StreamWriter(ms, encoding))
+            {
+                tw.WriteLine();
+
+                foreach (var entry in _entries)
+                {
+                    tw.Write("--");
+                    tw.WriteLine(_boundary);
+                    entry.AsMultipart(tw);
+                }
+
+                tw.Write("--");
+                tw.Write(_boundary);
+                tw.Write("--");
+            }
+
+            ms.Position = 0;
+            return ms;
+        }
+
+        /// <summary>
+        /// Applies the urlencoded algorithm.
+        /// http://www.w3.org/html/wg/drafts/html/master/forms.html#application/x-www-form-urlencoded-encoding-algorithm
+        /// </summary>
+        /// <param name="encoding">(Optional) Explicit encoding.</param>
+        /// <returns>A stream containing the body.</returns>
+        public Stream AsUrlEncoded(Encoding encoding = null)
         {
             encoding = encoding ?? Encoding.UTF8;
             var charset = encoding.WebName;
             var ms = new MemoryStream();
-
-            foreach (var entry in _entries)
-            {
-                if (entry.Name.Equals("_charset_") && entry.Type.Equals("hidden", StringComparison.OrdinalIgnoreCase))
-                    entry.Value = charset;
-
-                //TODO Replace Characters in Name & Value that cannot be expressed by using current encoding with &#...; base-10 unicode point
-                //RFC 2388
+            CheckBoundaries(encoding);
+            ReplaceCharset(encoding);
+
+            using (var tw = new StreamWriter(ms, encoding))
+            {
+                tw.WriteLine();
+
+                foreach (var entry in _entries)
+                {
+                    tw.Write(entry.Name);
+                    tw.Write('=');
+                    entry.AsUrlEncoded(tw);
+                }
             }

             ms.Position = 0;
@@ -69,37 +107,35 @@
         }

         /// <summary>
-        /// Applies the urlencoded algorithm.
-        /// http://www.w3.org/html/wg/drafts/html/master/forms.html#application/x-www-form-urlencoded-encoding-algorithm
+        /// Applies the plain encoding algorithm.
+        /// http://www.w3.org/html/wg/drafts/html/master/forms.html#text/plain-encoding-algorithm
         /// </summary>
         /// <param name="encoding">(Optional) Explicit encoding.</param>
-        /// <returns></returns>
-        public Stream AsUrlEncoded(Encoding encoding = null)
+        /// <returns>A stream containing the body.</returns>
+        public Stream AsPlaintext(Encoding encoding = null)
         {
             encoding = encoding ?? Encoding.UTF8;
             var charset = encoding.WebName;
             var ms = new MemoryStream();
-            //TODO
+            CheckBoundaries(encoding);
+            ReplaceCharset(encoding);
+
+            using (var tw = new StreamWriter(ms, encoding))
+            {
+                tw.WriteLine();
+
+                foreach (var entry in _entries)
+                {
+                    tw.Write(entry.Name);
+                    tw.Write('=');
+                    entry.AsPlaintext(tw);
+                }
+            }
+
             ms.Position = 0;
             return ms;
         }

-        /// <summary>
-        /// Applies the plain encoding algorithm.
-        /// http://www.w3.org/html/wg/drafts/html/master/forms.html#text/plain-encoding-algorithm
-        /// </summary>
-        /// <param name="encoding">(Optional) Explicit encoding.</param>
-        /// <returns></returns>
-        public Stream AsPlaintext(Encoding encoding = null)
-        {
-            encoding = encoding ?? Encoding.UTF8;
-            var charset = encoding.WebName;
-            var ms = new MemoryStream();
-            //TODO
-            ms.Position = 0;
-            return ms;
-        }
-
         public void Append(String name, String value, String type)
         {
             if (String.Compare(type, "textarea", StringComparison.OrdinalIgnoreCase) == 0)
@@ -108,8 +144,7 @@
                 value = Normalize(value);
             }

-            CheckBoundary(value);
-            _entries.Add(new FormDataSetEntry { Name = name, Value = value, Type = type });
+            _entries.Add(new TextDataSetEntry { Name = name, Value = value, Type = type });
         }

         public void Append(String name, FileEntry value, String type)
@@ -117,19 +152,40 @@
             if (String.Compare(type, "file", StringComparison.OrdinalIgnoreCase) == 0)
                 name = Normalize(name);

-            CheckBoundary(value);
-            _entries.Add(new FormDataSetEntry { Name = name, Value = value, Type = type });
+            _entries.Add(new FileDataSetEntry { Name = name, Value = value, Type = type });
         }

         #endregion

         #region Helpers

-        void CheckBoundary(Object value)
-        {
-            //TODO
-            //Check if there is any collision with the boundary string - if there is:
-            //Re-Generate Boundary String until there are no collisions with any value
+        void ReplaceCharset(Encoding encoding)
+        {
+            for (int i = 0; i < _entries.Count; i++ )
+            {
+                var entry = _entries[i];
+
+                if (entry.Name.Equals("_charset_") && entry.Type.Equals("hidden", StringComparison.OrdinalIgnoreCase))
+                    _entries[i] = new TextDataSetEntry { Name = entry.Name, Type = entry.Type, Value = encoding.WebName };
+            }
+        }
+
+        void CheckBoundaries(Encoding encoding)
+        {
+            var found = false;
+
+            do
+            {
+                for (int i = 0; i < _entries.Count; i++)
+                {
+                    if (_entries[i].Name.Contains(_boundary))
+                    { }
+                }
+
+                //TODO
+                //Check if there is any collision with the boundary string - if there is:
+                //Re-Generate Boundary String until there are no collisions with any value
+            } while (found);
         }

         /// <summary>
@@ -140,7 +196,7 @@
         /// </summary>
         /// <param name="value">The value to normalize.</param>
         /// <returns>The normalized string.</returns>
-        String Normalize(String value)
+        static String Normalize(String value)
         {
             var lines = value.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None);
             return String.Join("\r\n", lines);
@@ -153,7 +209,7 @@
         /// <summary>
         /// Encapsulates the data contained in an entry.
         /// </summary>
-        sealed class FormDataSetEntry
+        abstract class FormDataSetEntry
         {
             /// <summary>
             /// Gets or sets the entry's name.
@@ -174,13 +230,85 @@
             }

             /// <summary>
+            /// Replaces characters in names and values that cannot be expressed by using the given
+            /// encoding with &#...; base-10 unicode point.
+            /// </summary>
+            /// <param name="value">The value to sanatize.</param>
+            /// <param name="encoding">The encoding to consider.</param>
+            /// <returns>The sanatized value.</returns>
+            protected static String Sanatize(String value, Encoding encoding)
+            {
+                return value;
+            }
+
+            public abstract void AsMultipart(StreamWriter stream);
+
+            public abstract void AsPlaintext(StreamWriter stream);
+
+            public abstract void AsUrlEncoded(StreamWriter stream);
+        }
+
+        sealed class TextDataSetEntry : FormDataSetEntry
+        {
+            /// <summary>
             /// Gets or sets the entry's value.
             /// </summary>
-            public Object Value
+            public String Value
             {
                 get;
                 set;
             }
+
+            public override void AsMultipart(StreamWriter stream)
+            {
+                stream.WriteLine(String.Concat("content-disposition: form-data; name=\"", Sanatize(Name, stream.Encoding), "\""));
+                stream.WriteLine();
+                stream.WriteLine(Sanatize(Value, stream.Encoding));
+            }
+
+            public override void AsPlaintext(StreamWriter stream)
+            {
+                stream.WriteLine(Value);
+            }
+
+            public override void AsUrlEncoded(StreamWriter stream)
+            {
+                //TODO
+                throw new NotImplementedException();
+            }
+        }
+
+        sealed class FileDataSetEntry : FormDataSetEntry
+        {
+            /// <summary>
+            /// Gets or sets the entry's value.
+            /// </summary>
+            public FileEntry Value
+            {
+                get;
+                set;
+            }
+
+            public override void AsMultipart(StreamWriter stream)
+            {
+                stream.WriteLine("content-disposition: form-data; name=\"{0}\"; filename=\"{1}\"", Sanatize(Name, stream.Encoding), Value.FileName);
+                stream.WriteLine("content-type: " + Value.Type);
+                stream.WriteLine("content-transfer-encoding: binary");
+                stream.WriteLine();
+                stream.BaseStream.Write(Value.Body, 0, Value.Body.Length);
+                stream.WriteLine();
+            }
+
+            public override void AsPlaintext(StreamWriter stream)
+            {
+                stream.WriteLine(Value.FileName);
+            }
+
+            public override void AsUrlEncoded(StreamWriter stream)
+            {
+                //TODO
+                throw new NotImplementedException();
+            }
         }

         #endregion


added removing outdated libraries at RelHax startupfolder

--- RelicModManager/Forms/MainWindow.cs
+++ RelicModManager/Forms/MainWindow.cs
@@ -56,6 +56,7 @@
         public static List<string> usedFilesList;
         //counter for Utils.exception calls
         public static int errorCounter = 0;
+        public static Int64 backupFolderSize = 0;
         private List<SelectablePackage> userMods;
         private string currentModDownloading;
         public Installer ins;
@@ -115,6 +116,34 @@
               ControlStyles.DoubleBuffer, true
               );
             Logging.Manager("Style settings applied");
+        }
+
+        //parse the ModBackup folder to check current size
+        void parse_RelHaxModBackupFolder()
+        {
+            DirectoryInfo di = null;
+            FileInfo[] fiArr = null;        // files to pare in current folder
+            string[] foArr = new string[1];        // folders to parse
+
+            di = new DirectoryInfo(Settings.RelHaxModBackupFolder);
+            //get every patch file in the folder
+            fiArr = di.GetFiles("*.*", System.IO.SearchOption.TopDirectoryOnly);
+            foArr[0] = "";
+            int folderCount = 0;
+            while (folderCount < 0)
+            {
+                int c = 0;
+                while (c < fiArr.Length)
+                {
+                    if (fiArr[c].Attributes == FileAttributes.Directory)
+                    {
+
+                    }
+                }
+            }
+            //             if (false == true && backupFolderSize > 100000000 )
+            //                  this.backupModsCheckBox.Text = Translations.GetTranslatedString("backupModsCheckBox") + "\n" + Utils.SizeSuffix(backupFolderSize);
+
         }

         //handler for the mod download file progress
@@ -715,7 +744,7 @@

                 }
                 //check if old dll files can be deleted
-                string[] filesToDelete = { "DotNetZip.dll", "Ionic.Zip.dll", "Newtonsoft.Json.dll", "NAudio.dll" };
+                string[] filesToDelete = { "DotNetZip.dll", "Ionic.Zip.dll", "Newtonsoft.Json.dll", "NAudio.dll", "nvtt32.dll", "nvtt64.dll", "FreeImage32.dll", "FreeImage64.dll", "TeximpNet.dll", "TeximpNet.xml" };
                 foreach (string s in filesToDelete)
                     if (File.Exists(Path.Combine(Application.StartupPath, s)))
                         File.Delete(Path.Combine(Application.StartupPath, s));


Ensure the task is only  for that user account so the paths are always correct.

--- RemoteTaskServer/Utilities/Tools.cs
+++ RemoteTaskServer/Utilities/Tools.cs
@@ -370,7 +370,8 @@
                     "Bootstrapper.exe");
                 using (var sched = new TaskService())
                 {
-                    var t = sched.GetTask("Ulterius");
+                    var username = Environment.UserDomainName + "\\" + Environment.UserName;
+                    var t = sched.GetTask($"Ulterius {Environment.UserName}");
                     var taskExists = t != null;
                     if (runStartup)
                     {
@@ -380,12 +381,18 @@

                         td.RegistrationInfo.Author = "Octopodal Solutions";
                         td.RegistrationInfo.Date = new DateTime();
-                        td.RegistrationInfo.Description = "Starts and Updates the Ulterius Server";
-                        var logT = new LogonTrigger {Delay = new TimeSpan(0, 0, 0, 10)};
+                        td.RegistrationInfo.Description = "Keeps your Ulterius server up to date. If this task is disabled or stopped, your Ulterius server will not be kept up to date, meaning security vulnerabilities that may arise cannot be fixed and features may not work.";
+
+                        var logT = new LogonTrigger
+                        {
+                            Delay = new TimeSpan(0, 0, 0, 10),
+                            UserId = username
+                        };
                         //wait 10 seconds until after login is complete to boot
                         td.Triggers.Add(logT);
+
                         td.Actions.Add(fileName);
-                        TaskService.Instance.RootFolder.RegisterTaskDefinition("Ulterius", td);
+                        TaskService.Instance.RootFolder.RegisterTaskDefinition($"Ulterius {Environment.UserName}", td);
                         Console.WriteLine("Task Registered");
                     }
                     else


Fix NH-1345

Fix NH-1345

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@3570

--- src/NHibernate/Collection/Generic/PersistentGenericList.cs
+++ src/NHibernate/Collection/Generic/PersistentGenericList.cs
@@ -164,6 +164,7 @@

 		IEnumerator<T> IEnumerable<T>.GetEnumerator()
 		{
+			Read();
 			return glist.GetEnumerator();
 		}


disposable support for repositories

disposable support for repositories

--- server/ERNI.PhotoDatabase.DataAccess/Repository/RepositoryBase.cs
+++ server/ERNI.PhotoDatabase.DataAccess/Repository/RepositoryBase.cs
@@ -1,12 +1,24 @@
-namespace ERNI.PhotoDatabase.DataAccess.Repository
+using System;
+
+namespace ERNI.PhotoDatabase.DataAccess.Repository
 {
-    internal abstract class RepositoryBase
+    internal abstract class RepositoryBase : IDisposable
     {
         protected RepositoryBase(DatabaseContext dbContext)
         {
+            if(dbContext == null)
+            {
+                throw new ArgumentNullException(nameof(dbContext));
+            }
+
             this.DbContext = dbContext;
         }

         protected DatabaseContext DbContext { get; }
+
+        public void Dispose()
+        {
+            DbContext.Dispose();
+        }
     }
 }


Refactored TranslateExceptionAttribute to use constructor chaining

--- Aspekt/TranslateExceptionAttribute.cs
+++ Aspekt/TranslateExceptionAttribute.cs
@@ -22,10 +22,8 @@
             message_ = val;
         }

-        public TranslateExceptionAttribute(Type exceptionFrom, Type exceptionTo)
+        public TranslateExceptionAttribute(Type exceptionFrom, Type exceptionTo) : this(exceptionFrom, exceptionTo, null)
         {
-            ExceptionTo   = exceptionTo;
-            ExceptionFrom = exceptionFrom;
         }

         public override void OnEntry(MethodArguments arg)


Mark ScrollbarVisibilityReactiveProperty as 'internal'

--- Assets/Alensia/Core/UI/ScrollPanel.cs
+++ Assets/Alensia/Core/UI/ScrollPanel.cs
@@ -229,7 +229,7 @@
     }

     [Serializable]
-    public class ScrollbarVisibilityReactiveProperty : ReactiveProperty<ScrollbarVisibility>
+    internal class ScrollbarVisibilityReactiveProperty : ReactiveProperty<ScrollbarVisibility>
     {
     }
 }


show logtext only

show logtext only

--- Assets/ObjectTest/UniRxTestSandbox.cs
+++ Assets/ObjectTest/UniRxTestSandbox.cs
@@ -268,12 +268,16 @@
             sb.AppendLine("unscaledDeltaTime:" + Time.unscaledDeltaTime);
             sb.AppendLine("unscaledTime:" + Time.unscaledTime);

-            GUI.Box(new Rect(Screen.width - 300, Screen.height - 300, 300, 300), "Time");
-            GUI.Label(new Rect(Screen.width - 290, Screen.height - 290, 290, 290), sb.ToString());
+            //GUI.Box(new Rect(Screen.width - 300, Screen.height - 300, 300, 300), "Time");
+            //GUI.Label(new Rect(Screen.width - 290, Screen.height - 290, 290, 290), sb.ToString());
+
+            // logtext only
+            GUI.Box(new Rect(Screen.width - 300, Screen.height - 300, 300, 300), "logtext");
+            GUI.Label(new Rect(Screen.width - 290, Screen.height - 290, 290, 290), logtext.ToString());

             // Log
-            GUI.Box(new Rect(Screen.width - 300, 0, 300, 300), "Log");
-            GUI.Label(new Rect(Screen.width - 290, 10, 290, 290), logtext.ToString());
+            //GUI.Box(new Rect(Screen.width - 300, 0, 300, 300), "Log");
+            //GUI.Label(new Rect(Screen.width - 290, 10, 290, 290), logtext.ToString());
         }

         IEnumerator StringYield()


The actual audio fix lol

The actual audio fix lol

--- Assets/RadioGame/Scripts/RadarGame.cs
+++ Assets/RadioGame/Scripts/RadarGame.cs
@@ -68,7 +68,7 @@
             if (signals[i].clip != null) {
                 signalSources[i].clip = signals[i].clip;
                 signalSources[i].loop = true;
-                //signalSources[i].volume = signals[i].maxClipVolume;
+                signalSources[i].volume = 0;
                 signalSources[i].Play();
             }
         }


Only include count parameter in segments, when user specified a value

--- src/Intercom/Clients/SegmentsClient.cs
+++ src/Intercom/Clients/SegmentsClient.cs
@@ -59,16 +59,17 @@
             return result.Result;
         }

-        public Segment View(String id, bool includeCount = false)
+        public Segment View(String id, bool? includeCount = null)
         {
             if (String.IsNullOrEmpty(id))
             {
                 throw new ArgumentNullException(nameof(id));
             }

-            Dictionary<String, String> parameters = new Dictionary<String, String>
+            Dictionary<String, String> parameters = new Dictionary<String, String>();
+            if (includeCount != null && includeCount.HasValue)
             {
-                { "include_count", includeCount.ToString() }
+                parameters.Add("include_count", includeCount.ToString());
             };

             ClientResponse<Segment> result = null;
@@ -76,7 +77,7 @@
             return result.Result;
         }

-        public Segment View(Segment segment, bool includeCount = false)
+        public Segment View(Segment segment, bool? includeCount = null)
         {
             if (segment == null)
             {
@@ -88,9 +89,10 @@
                 throw new ArgumentException("you must provide value for 'segment.id'.");
             }

-            Dictionary<String, String> parameters = new Dictionary<String, String>
+            Dictionary<String, String> parameters = new Dictionary<String, String>();
+            if (includeCount != null && includeCount.HasValue)
             {
-                { "include_count", includeCount.ToString() }
+                parameters.Add("include_count", includeCount.ToString());
             };

             ClientResponse<Segment> result = null;


fixes #14

fixes #14

--- src/JiraCli/Services/VersionService.cs
+++ src/JiraCli/Services/VersionService.cs
@@ -71,7 +71,7 @@
                 {
                     if (item.Fields.IssueType != null && item.Fields.IssueType.SubTask)
                     {
-                        if(item.Fields.Parent == null)
+                        if (item.Fields.Parent == null)
                         {
                             Log.Error("Could not retrieve parent task for subtask: {0}", item.Key);
                             continue;          // do not attempt to apply to subtask.
@@ -133,17 +133,16 @@
                 Log.ErrorAndThrowException<InvalidOperationException>($"Project '{projectKey}' cannot be found or current user does not have access to the project");
             }

-            if(existingVersion == null)
-            {
-                jiraRestClient.CreateProjectVersion(new JiraProjectVersion
-                {
-                    Project = project.Key,
-                    Name = version,
-                });
-
-                Log.Info("Created version '{0}'", version);
-            }
-
+
+            jiraRestClient.CreateProjectVersion(new JiraProjectVersion
+            {
+                Project = project.Key,
+                Name = version,
+            });
+
+            Log.Info("Created version '{0}'", version);
+
+
         }

         public void ReleaseVersion(IJiraRestClient jiraRestClient, string projectKey, string version)
@@ -166,7 +165,18 @@
                 return;
             }

+            projectVersion.UserReleaseDate = null;
             projectVersion.ReleaseDate = DateTime.Now;
+
+            //if (string.IsNullOrWhiteSpace(projectVersion.UserReleaseDate))
+            //{
+
+            //}
+            //else
+            //{
+
+            //}
+
             projectVersion.Released = true;

             jiraRestClient.UpdateProjectVersion(projectVersion);


when filter list is empty, return all claims

--- source/MembershipRebootUserService/MembershipRebootUserService.cs
+++ source/MembershipRebootUserService/MembershipRebootUserService.cs
@@ -55,7 +55,7 @@
             }

             var claims = GetClaimsFromAccount(acct);
-            if (requestedClaimTypes != null)
+            if (requestedClaimTypes != null && requestedClaimTypes.Any())
             {
                 claims = claims.Where(x => requestedClaimTypes.Contains(x.Type));
             }


Update ScreenManager.cs

Update ScreenManager.cs

Using WaitForSecondsRealtime instead of WaitForSeconds to avoid problem when user set Time.timeScale = 0f;

--- Assets/ScreenManager/ScreenManager.cs
+++ Assets/ScreenManager/ScreenManager.cs
@@ -98,7 +98,7 @@

         IEnumerator CoroutineUpdate() {
-            var waitTime = new WaitForSeconds(0.1f);
+            var waitTime = new WaitForSecondsRealtime(0.1f);

             while (true) {
                 if (screenQueueDirty) {
@@ -332,4 +332,4 @@
         }
     }

-}+}


endJob

endJob

--- Assets/Scripts/Game/MigeonBehavior.cs
+++ Assets/Scripts/Game/MigeonBehavior.cs
@@ -13,18 +13,23 @@
 	protected int repeatAction = 0 ;
 	protected float distToFloor = 1.0f ;

-	protected float moveDistance = 5.0f ;
+	protected float autoMoveDistance = 5.0f ;
 	protected float speed = 1f ;
 	protected float speedRotation = 0.5f ;
 	protected bool jobToDo = true ;
 	public Vector3 target ;
 	public Vector3 targetJump ;
 	public Vector3 eulerAngleTarget ;
+	protected Vector3 playerPos ;

 	protected bool isGoingForward = false ;
 	protected bool isTurning = false ;
 	protected bool isJumping = false ;
 	protected bool isFalling = false ;
+
+	protected bool inPlayerVicinity = false ;
+
+	protected GameObject MyMaster ;

 	public bool carried { get; set; }
 	protected bool wasCarried = false ;
@@ -34,6 +39,7 @@
 		code = Genetics.makeGeneticCode() ;
 		player = GameObject.Find("Player").transform;
 		carried = false ;
+		MyMaster = GameObject.Find("Player") ;
 	}

 	void Update(){
@@ -41,6 +47,14 @@

 	// Update is called once per frame
 	void FixedUpdate() {
+		playerPos = MyMaster.transform.position ;
+		if(Vector3.Distance(playerPos, transform.position) <= 2.0f){
+			inPlayerVicinity = true ;
+		}else{
+			inPlayerVicinity = false ;
+		}
+
+
 		if (carried){
 			rigidbody.Sleep();
 			transform.position = player.position + transform.forward * 2f;
@@ -59,8 +73,24 @@
 			startJob () ;
 		}else if(jobToDo){
 			doYourJob() ;
-		}
-		/*
+		}else if(!jobToDo){
+			if(!isJumping){
+				Debug.Log("going to my master") ;
+			}
+
+			if(transform.position.y > distToFloor || isJumping){
+				if(jump()){
+					turn (1) ;
+				}
+			}
+			/*
+			if(!isGoingForward && !inPlayerVicinity){
+				Debug.Log("going to my master") ;
+				goForward(5.0f, playerPos) ;
+			}
+			*/
+		}
+
 		RaycastHit hit;
 		Physics.Raycast(rigidbody.transform.position, -Vector3.up, out hit) ;
 		if(!isFalling && hit.distance >= 1f){
@@ -71,7 +101,6 @@
 		}else if(isFalling){
 			rigidbody.AddForce(-Vector3.up*2f,ForceMode.Impulse) ;
 		}
-		*/
 	}

 	void startJob(){
@@ -84,19 +113,29 @@

 		switch(code.actions[stepAction]){
 			case Genetics.MIGEON_ACTION.AVANCER :
-				goForward() ;
+				if(goForward(autoMoveDistance)){
+					stepAction++ ;
+				}
 			break;
 			case Genetics.MIGEON_ACTION.TURN_LEFT :
-				turn (1) ;
+				if(turn (1)) {
+					stepAction++ ;
+				}
 				break ;
 			case Genetics.MIGEON_ACTION.TURN_RIGHT :
-				turn(2) ;
-				break;
+				if(turn (2)) {
+					stepAction++ ;
+				}
+			break;
 			case Genetics.MIGEON_ACTION.JUMP :
-				jump() ;
-				break;
+				if(jump ()) {
+					stepAction++ ;
+				}
+			break;
 			case Genetics.MIGEON_ACTION.PUT_CUBE :
-				createBlock() ;
+				if(createBlock()) {
+					stepAction++ ;
+				}
 				break;
 		}
 		if(stepAction >= code.actions.Length-1){
@@ -117,25 +156,30 @@
 		return true ;
 	}

-	void goForward(){
+	bool goForward(float moveDistance = 5.0f, Vector3 targetToGo = default(Vector3)){
 		if(!isGoingForward){
-			target = transform.forward*moveDistance + rigidbody.position ;
-			target.x = Mathf.Round(target.x) ;
-			target.y = Mathf.Round(target.y) ;
-			target.z = Mathf.Round(target.z) ;
+			if(targetToGo.magnitude > 0.1f){
+				target = Vector3.Normalize(target-rigidbody.position)*5.0f ;
+				Debug.Log ("going to "+target) ;
+			}else{
+				target = transform.forward*moveDistance + rigidbody.position ;
+				target.x = Mathf.Round(target.x) ;
+				target.y = Mathf.Round(target.y) ;
+				target.z = Mathf.Round(target.z) ;
+			}
 			isGoingForward = true ;
 		}
 		target.y = rigidbody.transform.position.y ;
 		Vector3 dir = Vector3.Normalize(target-rigidbody.position) ;
 		if(!canIGo(dir, moveDistance+0.1f)){
 			isGoingForward = false ;
-			stepAction++ ;
-			return ;
+			return true ;
 		}else{
 			rigidbody.AddForce(dir*2f,ForceMode.Impulse) ;
 		}

 		/*TODO GENERALIZE*/
+		/*
 		RaycastHit hit;
 		Physics.Raycast(rigidbody.transform.position, -Vector3.up, out hit) ;
 		if(!isFalling && hit.distance >= 1f){
@@ -145,7 +189,7 @@
 			isFalling = false ;
 		}else if(isFalling){
 			rigidbody.AddForce(-Vector3.up*2f,ForceMode.Impulse) ;
-		}
+		}*/

 		if(Vector3.Distance(rigidbody.transform.position, target) <= .2f){
 			rigidbody.MovePosition(target) ;
@@ -153,11 +197,12 @@
 			isFalling = false ;
 			isGoingForward = false ;
 			rigidbody.velocity = new Vector3(0f,0f,0f) ;
-			stepAction++ ;
-		}
-	}
-
-	void turn(int direction){
+			return true ;
+		}
+		return false ;
+	}
+
+	bool turn(int direction){
 		if(!isTurning){
 			if (direction == 1) {
 				//turn left
@@ -177,13 +222,14 @@
 		if(Vector3.Distance(rigidbody.rotation.eulerAngles, eulerAngleTarget) <= 0.2f){
 			rigidbody.MoveRotation(Quaternion.Euler(eulerAngleTarget)) ;
 			isTurning = false ;
-			stepAction++ ;
-		}
-	}
-
-	void jump(){
+			return true ;
+		}
+		return false ;
+	}
+
+	bool jump(){
 		if(canIGo(Vector3.Normalize(transform.forward+transform.up),1.1f)){
-			Debug.DrawLine(rigidbody.transform.position,rigidbody.transform.position + (transform.forward*1f + transform.up));
+			//Debug.DrawLine(rigidbody.transform.position,rigidbody.transform.position + (transform.forward*1f + transform.up));
 			if(!isJumping){
 				targetJump = rigidbody.transform.position + (transform.forward*1.0f + transform.up) ;
 				isJumping = true ;;
@@ -201,6 +247,18 @@
 		}
 		RaycastHit hit;
 		Physics.Raycast(rigidbody.transform.position, -Vector3.up, out hit) ;
+		if(isFalling && rigidbody.velocity.y <= 0.1f && hit.distance <= 1f){
+			rigidbody.MovePosition(new Vector3(targetJump.x, rigidbody.transform.position.y, targetJump.z)) ;
+			snapToFloor() ;
+			isJumping = false ;
+			isFalling = false ;
+			rigidbody.velocity = new Vector3(0f,0f,0f) ;
+			return true ;
+		}
+		return false ;
+		/*
+		RaycastHit hit;
+		Physics.Raycast(rigidbody.transform.position, -Vector3.up, out hit) ;

 		if(isFalling && rigidbody.velocity.y <= 0.1f && hit.distance <= 1f){
 			rigidbody.MovePosition(new Vector3(targetJump.x, rigidbody.transform.position.y, targetJump.z)) ;
@@ -212,9 +270,10 @@
 		}else if(isFalling){
 			rigidbody.AddForce(-Vector3.up*1.5f,ForceMode.Impulse) ;
 		}
-	}
-
-	void createBlock(){
+		*/
+	}
+
+	bool createBlock(){
 		float distance = 1 ;
 		if(canIGo(rigidbody.transform.forward, distance+0.1f)){
 			GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
@@ -224,7 +283,7 @@
 			newPos.z = Mathf.Round(newPos.z) ;
 			cube.transform.position = newPos ;
 		}
-		stepAction++ ;
+		return true ;
 	}

 	void snapToFloor(){


Timer Added

Timer Added

#Timer will trigger night transition at specified time (default value = 90 seconds)

--- Assets/Scripts/HUD/NightController.cs
+++ Assets/Scripts/HUD/NightController.cs
@@ -7,13 +7,22 @@
 	public float nightAlpha;
 	public float fadeTime;
 	public bool isNight;
+	public float nightThreshold;

+	private float time;
 	CanvasGroup canvasGroup;
 	IEnumerator coroutine;

 	void Start() {
 		canvasGroup = GetComponent<CanvasGroup>();
 		isNight = false;
+		time = 0;
+
+		if (nightThreshold == 0) {
+			nightThreshold = 90f;
+		}
+
+		InvokeRepeating ("Timer", 1.0f, 1.0f);
 	}

 	void Update() {
@@ -39,6 +48,15 @@
 		}
 	}

+	void Timer(){
+		time++;
+		if (time == nightThreshold) {
+			isNight = true;
+			coroutine = FadeNight ();
+			StartCoroutine (coroutine);
+		}
+	}
+
 	IEnumerator FadeNight() {
 		while (canvasGroup.alpha < nightAlpha) {
 			canvasGroup.alpha = Mathf.Lerp(canvasGroup.alpha, nightAlpha, fadeTime);


Basic keys and movement setup with scaling

--- Assets/Scripts/UI/CameraController.cs
+++ Assets/Scripts/UI/CameraController.cs
@@ -3,15 +3,77 @@
 using UnityEngine;

 public class CameraController : MonoBehaviour {
-
-    void Update()
-    {
+
+	private Camera cam;
+	private float camSpd = 0.5f;
+	private float accFactor = 3.0f;
+
+	private void Start()
+	{
+		cam = GetComponent<Camera>();
+
+		// just for testing purposes
+		InputManager.BombFire = () => {Debug.Log("Test");};
+	}
+
+	private void Update()
+	{
 		if (Input.GetMouseButton(1))
 		{
-        	float y = Input.GetAxis("Mouse X");
-        	float x = Input.GetAxis("Mouse Y");
-        	Vector3 rotation = new Vector3(x, -y, 0);
-        	transform.eulerAngles = transform.eulerAngles - rotation;
+			float y = Input.GetAxis("Mouse X");
+			float x = Input.GetAxis("Mouse Y");
+			Vector3 rotation = new Vector3(x, -y, 0);
+			transform.eulerAngles = transform.eulerAngles - rotation;
 		}
-    }
+
+		if (Input.GetKey(KeyCode.A))
+		{
+			cam.transform.Translate(Vector3.forward * camSpd, Space.World);
+		}
+
+		if (Input.GetKey(KeyCode.D))
+		{
+			cam.transform.Translate(Vector3.back * camSpd, Space.World);
+		}
+
+		if (Input.GetKey(KeyCode.W))
+		{
+			cam.transform.Translate(Vector3.right * camSpd, Space.World);
+		}
+
+		if (Input.GetKey(KeyCode.S))
+		{
+			cam.transform.Translate(Vector3.left * camSpd, Space.World);
+		}
+
+		if (Input.GetKey(KeyCode.Q))
+		{
+			cam.transform.Translate(Vector3.down * camSpd);
+		}
+
+		if (Input.GetKey(KeyCode.E))
+		{
+			cam.transform.Translate(Vector3.up * camSpd);
+		}
+
+		if (Input.GetAxis("Mouse ScrollWheel") > 0)
+		{
+			cam.transform.Translate(Vector3.forward * camSpd);
+		}
+
+		if (Input.GetAxis("Mouse ScrollWheel") < 0)
+		{
+			cam.transform.Translate(Vector3.back * camSpd);
+		}
+
+		if (Input.GetKeyDown(KeyCode.LeftShift))
+		{
+			camSpd *= accFactor;
+		}
+
+		if (Input.GetKeyUp(KeyCode.LeftShift))
+		{
+			camSpd /= accFactor;
+		}
+	}
 }


Adding a null check.

Adding a null check.

--- Assets/new_multiplayer/NewGameUnit.cs
+++ Assets/new_multiplayer/NewGameUnit.cs
@@ -246,11 +246,13 @@

 		[Command]
 		public void CmdDestroy(GameObject obj, GameObject targetUnit) {
-			NewGameUnit unit = targetUnit.GetComponent<NewGameUnit>();
-			NewChanges changes = unit.CurrentProperty();
-			if (changes.targetUnit.Equals(obj)) {
-				changes.targetUnit = null;
-				unit.NewProperty(changes);
+			if (targetUnit != null) {
+				NewGameUnit unit = targetUnit.GetComponent<NewGameUnit>();
+				NewChanges changes = unit.CurrentProperty();
+				if (changes.targetUnit.Equals(obj)) {
+					changes.targetUnit = null;
+					unit.NewProperty(changes);
+				}
 			}
 			NetworkServer.Destroy(obj);
 		}
@@ -290,7 +292,7 @@
 		public void RpcSetDestination(GameObject obj, Vector3 pos) {
 			NewGameUnit unit = obj.GetComponent<NewGameUnit>();
 			if (unit != null && unit.agent != null) {
-				unit.agent.SetDestination(pos);
+				unit.agent.SetDestination(pos);
 			}
 		}
 	}


Fix CSS bundles

Fix CSS bundles

--- BForms.Docs/App_Start/BundleConfig.cs
+++ BForms.Docs/App_Start/BundleConfig.cs
@@ -11,7 +11,6 @@
             bundles.Add(new StyleBundle("~/css")
                 .Include("~/Scripts/BForms/Components/Bootstrap/css/*.css", new CssRewriteUrlTransform())
                 .Include("~/Scripts/BForms/Plugins/Select2/css/*.css", new CssRewriteUrlTransform())
-                .Include("~/Scripts/BForms/Plugins/Datepicker/css/*.css", new CssRewriteUrlTransform())
                 .Include("~/Scripts/BForms/Stylesheets/*.css", new CssRewriteUrlTransform())
                 .Include("~/Content/Stylesheets/*.css", new CssRewriteUrlTransform())
                 );


modify IExchangeRatesProvider to provide support for ExchangeRates from previous years

--- KursyWalut/Provider/IExchangeRatesProvider.cs
+++ KursyWalut/Provider/IExchangeRatesProvider.cs
@@ -6,8 +6,12 @@
 {
     internal interface IExchangeRatesProvider : IObservable<int>
     {
-        Task<IList<DateTime>> GetAvailableDates();
+    	Task<IList<int>> GetAvailableYears();
+        Task<IList<DateTime>> GetAvailableDates(int year);
+
         Task<IList<ExchangeRate>> GetExchangeRates(DateTime day);
-        Task<IList<ExchangeRate>> GetExchangeRatesHistory(Currency currency, DateTime startDay, DateTime stopDay);
+        Task<ExchangeRate> GetExchangeRate(Currency currency, DateTime day);
+
+        Task<IList<ExchangeRate>> GetExchangeRateHistory(Currency currency, DateTime startDay, DateTime stopDay);
     }
 }


Better error messages

Better error messages

--- LINQToTTreeHelpers/LINQToTreeHelpers/Utils.cs
+++ LINQToTTreeHelpers/LINQToTreeHelpers/Utils.cs
@@ -14,10 +14,16 @@
         /// Write out an object. Eventually, with ROOTNET improvements this will work better and perahps
         /// won't be needed!
         /// </summary>
-        /// <param name="obj"></param>
+        /// <param name="obj">The object to be written. Assumed not null.</param>
         /// <param name="dir"></param>
         internal static void InternalWriteObject(this ROOTNET.Interface.NTObject obj, ROOTNET.Interface.NTDirectory dir)
         {
+            if (obj == null)
+            {
+                Console.WriteLine("WARNING: Unable to write out null object to a TDirectory!");
+                return;
+            }
+
             var h = obj as ROOTNET.Interface.NTH1;
             if (h != null)
             {


PipelineCache.Key hash code perf improvements

--- src/Maestro/Internals/PipelineCache.cs
+++ src/Maestro/Internals/PipelineCache.cs
@@ -25,10 +25,18 @@

 		internal struct Key
 		{
+			private readonly int _hashCode;
+
 			public Key(Type type, string name)
 			{
+				_hashCode = CalculateHashCode(type, name);
 				Type = type;
 				Name = name;
+			}
+
+			private static int CalculateHashCode(Type type, string name)
+			{
+				return (type.GetHashCode() * 397) ^ name.GetHashCode();
 			}

 			public Type Type { get; }
@@ -47,10 +55,7 @@

 			public override int GetHashCode()
 			{
-				unchecked
-				{
-					return ((Type != null ? Type.GetHashCode() : 0) * 397) ^ (Name != null ? Name.GetHashCode() : 0);
-				}
+				return _hashCode;
 			}
 		}
 	}