Fix .msi installer generation

Fix .msi installer generation

--- wixcs/setup.cs
+++ wixcs/setup.cs
@@ -62,7 +62,7 @@
 			new File(featureBuilder, @"LICENSE")
 		);
 		foreach (string file in System.IO.Directory.GetFiles(@"target\release", "*.dll")) {
-			dir.Files.Add(new File(featureBuilder, @"target\release\*.dll"));
+			dir.Files.Add(new File(featureBuilder, file));
 		}
 		Project project = new Project("Octobuild",
 			dir,


Explain transaction timeout in more detail.

--- AerospikeClient/Policy/Policy.cs
+++ AerospikeClient/Policy/Policy.cs
@@ -36,10 +36,16 @@
 		public ConsistencyLevel consistencyLevel = ConsistencyLevel.CONSISTENCY_ONE;

 		/// <summary>
-		/// Transaction timeout in milliseconds.
-		/// This timeout is used to set the socket timeout and is also sent to the
-		/// server along with the transaction in the wire protocol.
+		/// Total transaction timeout in milliseconds for both client and server.
+		/// The timeout is tracked on the client and also sent to the server along
+		/// with the transaction in the wire protocol.  The client will most likely
+		/// timeout first, but the server has the capability to timeout the transaction
+		/// as well.
+		/// <para>
+		/// The timeout is also used as a socket timeout.  Retries will not occur
+		/// if the timeout limit has been reached.
 		/// Default to no timeout (0).
+		/// </para>
 		/// </summary>
 		public int timeout;


Connector. SetAdapterFailed fix.

Connector. SetAdapterFailed fix.

--- Algo/Connector_ProcessMessage.cs
+++ Algo/Connector_ProcessMessage.cs
@@ -1095,21 +1095,23 @@
 		{
 			_adapterStates[adapter] = ConnectionStates.Failed;

+			error = error ?? message.Error;
+
 			// raise ConnectionError only one time
 			if (ConnectionState == checkState)
 			{
-				RaiseConnectionError(error ?? message.Error);
+				RaiseConnectionError(error);

 				if (raiseTimeOut)
 				{
-					if (message.Error is TimeoutException)
+					if (error is TimeoutException)
 						RaiseTimeOut();
 				}
 			}
 			else
-				RaiseError(error ?? message.Error);
-
-			RaiseConnectionErrorEx(adapter, message.Error);
+				RaiseError(error);
+
+			RaiseConnectionErrorEx(adapter, error);
 		}

 		private void ProcessSessionMessage(SessionMessage message)


Add symbol to error message for user

Add symbol to error message for user

--- Algorithm/QCAlgorithm.Trading.cs
+++ Algorithm/QCAlgorithm.Trading.cs
@@ -328,7 +328,7 @@

             if (price == 0)
             {
-                Error("Asset price is $0. If using custom data make sure you've set the 'Value' property.");
+                Error(symbol + ": asset price is $0. If using custom data make sure you've set the 'Value' property.");
                 return -1;
             }


Updated Reflection extensions

Updated Reflection extensions

--- AngleSharp/PortableExtensions.cs
+++ AngleSharp/PortableExtensions.cs
@@ -77,32 +77,32 @@
             return type.GetTypeInfo().GetDeclaredProperty(name);
         }

-        public static Boolean IsValueType(this Type type)
+        public static Boolean IsStructType(this Type type)
         {
             return type.GetTypeInfo().IsValueType;
         }

-        public static Boolean IsClass(this Type type)
+        public static Boolean IsClassType(this Type type)
         {
             return type.GetTypeInfo().IsClass;
         }

-        public static Boolean IsAbstract(this Type type)
+        public static Boolean IsAbstractClass(this Type type)
         {
             return type.GetTypeInfo().IsAbstract;
         }

-        public static Boolean IsNestedPrivate(this Type type)
+        public static Boolean IsNestedPrivateClass(this Type type)
         {
             return type.GetTypeInfo().IsNestedPrivate;
         }

-        public static Boolean IsGenericType(this Type type)
+        public static Boolean IsGenericClass(this Type type)
         {
             return type.GetTypeInfo().IsGenericType;
         }

-        public static Boolean ContainsGenericParameters(this Type type)
+        public static Boolean ContainsGenericClassParameters(this Type type)
         {
             return type.GetTypeInfo().ContainsGenericParameters;
         }
@@ -112,7 +112,7 @@
             return type.GetTypeInfo().BaseType;
         }

-        public static Boolean IsGenericTypeDefinition(this Type type)
+        public static Boolean IsGenericClassDefinition(this Type type)
         {
             return type.GetTypeInfo().IsGenericTypeDefinition;
         }
@@ -145,42 +145,42 @@

         public static Boolean IsEnumerableOfT(this Type serviceType)
         {
-            return serviceType.IsGenericType() && serviceType.GetGenericTypeDefinition() == typeof(IEnumerable<>);
+            return serviceType.IsGenericClass() && serviceType.GetGenericTypeDefinition() == typeof(IEnumerable<>);
         }

         public static Boolean IsListOfT(this Type serviceType)
         {
-            return serviceType.IsGenericType() && serviceType.GetGenericTypeDefinition() == typeof(IList<>);
+            return serviceType.IsGenericClass() && serviceType.GetGenericTypeDefinition() == typeof(IList<>);
         }

         public static Boolean IsCollectionOfT(this Type serviceType)
         {
-            return serviceType.IsGenericType() && serviceType.GetGenericTypeDefinition() == typeof(ICollection<>);
+            return serviceType.IsGenericClass() && serviceType.GetGenericTypeDefinition() == typeof(ICollection<>);
         }

         public static Boolean IsReadOnlyCollectionOfT(this Type serviceType)
         {
-            return serviceType.IsGenericType() && serviceType.GetGenericTypeDefinition() == typeof(IReadOnlyCollection<>);
+            return serviceType.IsGenericClass() && serviceType.GetGenericTypeDefinition() == typeof(IReadOnlyCollection<>);
         }

         public static Boolean IsReadOnlyListOfT(this Type serviceType)
         {
-            return serviceType.IsGenericType() && serviceType.GetGenericTypeDefinition() == typeof(IReadOnlyList<>);
+            return serviceType.IsGenericClass() && serviceType.GetGenericTypeDefinition() == typeof(IReadOnlyList<>);
         }

         public static Boolean IsLazy(this Type serviceType)
         {
-            return serviceType.IsGenericType() && serviceType.GetGenericTypeDefinition() == typeof(Lazy<>);
+            return serviceType.IsGenericClass() && serviceType.GetGenericTypeDefinition() == typeof(Lazy<>);
         }

         public static Boolean IsFunc(this Type serviceType)
         {
-            return serviceType.IsGenericType() && serviceType.GetGenericTypeDefinition() == typeof(Func<>);
+            return serviceType.IsGenericClass() && serviceType.GetGenericTypeDefinition() == typeof(Func<>);
         }

         public static Boolean IsFuncWithParameters(this Type serviceType)
         {
-            if (!serviceType.IsGenericType())
+            if (!serviceType.IsGenericClass())
                 return false;

             var genericTypeDefinition = serviceType.GetGenericTypeDefinition();
@@ -189,7 +189,7 @@

         public static Boolean IsClosedGeneric(this Type serviceType)
         {
-            return serviceType.IsGenericType() && !serviceType.IsGenericTypeDefinition();
+            return serviceType.IsGenericClass() && !serviceType.IsGenericClassDefinition();
         }

         public static Boolean IsGenericGetInstanceMethod(this MethodInfo m)
@@ -199,7 +199,7 @@

         public static Type GetElementType(this Type type)
         {
-            if (type.IsGenericType() && type.GetGenericTypeArguments().Count() == 1)
+            if (type.IsGenericClass() && type.GetGenericTypeArguments().Count() == 1)
             {
                 return type.GetGenericTypeArguments()[0];
             }


dispatcher shuts down correctly now

dispatcher shuts down correctly now

--- src/shawlib/Dispatcher.cs
+++ src/shawlib/Dispatcher.cs
@@ -54,8 +54,8 @@

         public void Shutdown(bool waitForPendingTasks = true)
         {
+            wait = waitForPendingTasks;
             stop = true;
-            wait = waitForPendingTasks;
         }

         public void Join()


Fix typo for Jwk.NameToCurve

Fix typo for Jwk.NameToCurve

--- jose-jwt/jwk/Jwk.cs
+++ jose-jwt/jwk/Jwk.cs
@@ -535,7 +535,7 @@
             switch (name)
             {
                 case "P-256": return ECCurve.NamedCurves.nistP256;
-                case "P-284": return ECCurve.NamedCurves.nistP384;
+                case "P-384": return ECCurve.NamedCurves.nistP384;
                 case "P-521": return ECCurve.NamedCurves.nistP521;
             }


added encryption option and other token generation method

--- src/samples/token.csx
+++ src/samples/token.csx
@@ -9,9 +9,18 @@
 }
 else
 {
+  // Uncomment this to encrypt the token generation requests
+  // arcgis.EncryptTokenRequests = true;
+
+  // first way
   var gateway = arcgis.CreateGateway(serverUrl, username, password);
   var token = gateway.TokenProvider.CheckGenerateToken(CancellationToken.None).Result;

   Console.WriteLine(String.Format("Token expires at {0:g}", token.Expiry.FromUnixTime().ToLocalTime()));
   Console.WriteLine(token.Value);
+
+  // second way
+  var otherToken = new TokenProvider(serverUrl, username, password).CheckGenerateToken(CancellationToken.None).Result;
+  Console.WriteLine(String.Format("Token expires at {0:g}", otherToken.Expiry.FromUnixTime().ToLocalTime()));
+  Console.WriteLine(otherToken.Value);
 }


Sync up changes from SE

Sync up changes from SE

--- TypeColorBehavior.cs
+++ TypeColorBehavior.cs
@@ -64,24 +64,6 @@
             get { return title; }
         }

-        // TODO: Subject to refactoting
-        private EHPMReportViewType GetViewType(string viewType)
-        {
-            switch (viewType)
-            {
-                case ("Agile"):
-                    return EHPMReportViewType.AgileMainProject;
-                case ("Scheduled"):
-                    return EHPMReportViewType.ScheduleMainProject;
-                case ("Bugs"):
-                    return EHPMReportViewType.AllBugsInProject;
-                case ("Backlog"):
-                    return EHPMReportViewType.AgileBacklog;
-                default:
-                    throw new ArgumentException("Unsupported View Type: " + viewType);
-            }
-        }
-
         private void DoUpdate()
         {
             if (initializationOK)


Update NativeMethods.cs

Update NativeMethods.cs

--- AeroSuite/NativeMethods.cs
+++ AeroSuite/NativeMethods.cs
@@ -18,6 +18,9 @@
         [DllImport(user32)]
         public static extern IntPtr SendMessage(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam);

+        [DllImport(user32, CharSet = CharSet.Unicode)]
+        public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, string lParam);
+
         [DllImport(uxtheme, CharSet = CharSet.Unicode)]
         public extern static int SetWindowTheme(IntPtr hWnd, string pszSubAppName, string pszSubIdList);
     }


Updated script

Updated script

--- Scripts/DemoExecute.cs
+++ Scripts/DemoExecute.cs
@@ -18,8 +18,8 @@
                 rand.NextDouble() * width,
                 rand.NextDouble() * height,
                 s, p.Options.PointShape);
-            Execute(() => c.CurrentLayer.Shapes = c.CurrentLayer.Shapes.Add(line));
-            Execute(() => c.CurrentLayer.Invalidate());
+            c.CurrentLayer.Shapes = c.CurrentLayer.Shapes.Add(line);
+            c.CurrentLayer.Invalidate();
             Thread.Sleep(delay);
         }
     });


prev commit fix.

prev commit fix.


fix branch exception, show auto-merges when they are heads

--- VersionrCore/Area.cs
+++ VersionrCore/Area.cs
@@ -3180,7 +3180,9 @@
                         automerged = true;
                     }
                     merged = true;
-                    if ((showMerges || (!rebased && !followBranches)) && (!automerged || showAutoMerges))
+                    bool head = GetBranchHead(GetBranch(x.Branch)).Version == x.ID;
+
+                    if ((showMerges || (!rebased && !followBranches)) && (!automerged || showAutoMerges) || head)
                     {
                         if (!added)
                         {
@@ -6052,7 +6054,10 @@
             Printer.PrintDiagnostics("Checking for existing branch \"{0}\".", v);
             var branch = GetBranchByName(v).FirstOrDefault();
             if (branch != null)
-                throw new Exception(string.Format("Branch \"{0}\" already exists!", v));
+            {
+                Printer.PrintError(string.Format("Branch \"{0}\" already exists!", v));
+                return;
+            }

             Objects.Version currentVer = Database.Version;
             branch = Objects.Branch.Create(v, currentVer.ID, currentVer.Branch);


Parteditview: Hide unwanted columns

Parteditview: Hide unwanted columns

--- View/parteditview.cs
+++ View/parteditview.cs
@@ -65,6 +65,7 @@
         dgvAttributes.MultiSelect = false;
         dgvAttributes.AllowUserToAddRows = false;
         dgvAttributes.AllowUserToDeleteRows = false;
+        dgvAttributes.DataBindingComplete += new DataGridViewBindingCompleteEventHandler(dgv_DataBindingComplete);
         tlp0.Controls.Add(dgvAttributes, 0, 1);
         tlp0.SetColumnSpan(dgvAttributes, 3);

@@ -73,12 +74,24 @@
         dgvExtendedAttributes.MultiSelect = false;
         dgvExtendedAttributes.AllowUserToAddRows = false;
         dgvExtendedAttributes.AllowUserToDeleteRows = false;
+        dgvExtendedAttributes.DataBindingComplete += new DataGridViewBindingCompleteEventHandler(dgv_DataBindingComplete);
         tlp0.Controls.Add(dgvExtendedAttributes, 0, 2);
         tlp0.SetColumnSpan(dgvExtendedAttributes, 3);

         Util.FixTableLayoutStyles(tlp0);

         this.ResumeLayout();
+    }
+
+    private void dgv_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
+    {
+        DataGridView dgv = (DataGridView)sender;
+        if (dgv.Columns.Contains("Part_num")) {
+            dgv.Columns["Part_num"].Visible = false;
+        }
+        if (dgv.Columns.Contains("Part_type_id")) {
+            dgv.Columns["Part_type_id"].Visible = false;
+        }
     }

     public void Reset()


fixes #1 GetIDs did not work becasue not ViewMapping attribute was being returned

--- ViewMappingHelper.cs
+++ ViewMappingHelper.cs
@@ -34,14 +34,17 @@
                         attr = (ViewMappingAttribute)caList.SingleOrDefault(ca => ((ViewMappingAttribute)ca).Type == Model.Name);
                     else if (caList.Count() == 0 && Model != null && GetModelPropertyName != null)
                         attr = new ViewMappingAttribute();
-
+                    else if (IsEntityKey() && Model == null)
+                        attr = new ViewMappingAttribute();
                     if (attr != null)
                         if (String.IsNullOrEmpty(attr.ColumnPropertyName) && GetModelPropertyName != null)
                             attr.ColumnPropertyName = GetModelPropertyName;
+
+                    if (attr != null)
+                        attr.Key = IsEntityKey();
                     _attr = attr;
                 }
-                if (_attr != null)
-                    this.SetIsKey(_attr);
+
                 return _attr;
             }

@@ -125,10 +128,9 @@
             }
         }

-        private void SetIsKey(ViewMappingAttribute viewMapping)
+        private Boolean IsEntityKey()
         {
-            if (!viewMapping.Key)
-                viewMapping.Key = PropInfo.Name.ToLower() == "id";
+            return PropInfo.Name.ToLower() == "id";
         }

         private String _modelPropertyName = null;


Move respose check to new method

Move respose check to new method

--- Anlab.Mvc/Controllers/PaymentController.cs
+++ Anlab.Mvc/Controllers/PaymentController.cs
@@ -104,6 +104,36 @@
                 return NotFound(response.Req_Reference_Number);
             }

+            var responeValid = CheckResponse(response);
+            if (!responeValid.IsValid)
+            {
+                ErrorMessage = ErrorMessage = string.Format("Errors detected: {0}", string.Join(",", responeValid.Errors));
+                return RedirectToAction("Pay", new {id = order.Id});
+            }
+
+
+            //Should be good,
+            if (response.Decision != ReplyCodes.Accept)
+            {
+                Log.Error("Got past all the other checks. But it still wasn't Accepted");
+            }
+            else
+            {
+                order.Status = OrderStatusCodes.Paid;
+                _context.SaveChanges(true);
+                Message = "Payment Processed. Thank You.";
+            }
+
+
+
+            ViewBag.PaymentDictionary = dictionary; //Debugging. Remove when not needed
+
+            return View(response);
+        }
+
+        private CheckResponseResults CheckResponse(ReceiptResponseModel response)
+        {
+            var rtValue = new CheckResponseResults();
             //Ok, check response
             // general error, bad request
             if (string.Equals(response.Decision, ReplyCodes.Error) ||
@@ -111,17 +141,16 @@
                 response.Reason_Code == ReasonCodes.MerchantAccountError)
             {
                 //TODO: send to general error page
-                Log.ForContext("decision", response.Decision).ForContext("reason", response.Reason_Code).Warning("Unsuccessful Reply");
-                ErrorMessage = "An error has occurred. If you experience further problems, please contact us";
-                return RedirectToAction("Index", "Home");
+                Log.ForContext("decision", response.Decision).ForContext("reason", response.Reason_Code)
+                    .Warning("Unsuccessful Reply");
+                rtValue.Errors.Add("An error has occurred. If you experience further problems, please contact us");
             }

             // this is only possible on a hosted payment page
             if (string.Equals(response.Decision, ReplyCodes.Cancel))
             {
                 Log.ForContext("decision", response.Decision).ForContext("reason", response.Reason_Code).Warning("Cancelled Reply");
-                ErrorMessage = "The payment process was canceled before it could complete. If you experience further problems, please contact us";
-                return RedirectToAction("Index", "Home");
+                rtValue.Errors.Add("The payment process was canceled before it could complete. If you experience further problems, please contact us");
             }

             // manual review required
@@ -129,8 +158,7 @@
             {
                 //TODO: send to general error page
                 Log.ForContext("decision", response.Decision).ForContext("reason", response.Reason_Code).Warning("Manual Review Reply");
-                ErrorMessage = "Error with Credit Card. Please contact issuing bank. If you experience further problems, please contact us";
-                return RedirectToAction("Index", "Home");
+                rtValue.Errors.Add("Error with Credit Card. Please contact issuing bank. If you experience further problems, please contact us");
             }

             // bad cc information, return to payment page
@@ -139,23 +167,20 @@
                 if (response.Reason_Code == ReasonCodes.AvsFailure)
                 {
                     Log.ForContext("decision", response.Decision).ForContext("reason", response.Reason_Code).Warning("Avs Failure");
-                    ErrorMessage = "Were sorry, but it appears that the billing address that you entered does not match the billing address registered with your card. Please verify that the billing address and zip code you entered are the ones registered with your card issuer and try again. If you experience further problems, please contact us";
-                    return RedirectToAction("Index", "Home");
+                    rtValue.Errors.Add("Were sorry, but it appears that the billing address that you entered does not match the billing address registered with your card. Please verify that the billing address and zip code you entered are the ones registered with your card issuer and try again. If you experience further problems, please contact us");
                 }

                 if (response.Reason_Code == ReasonCodes.BankTimeoutError ||
                     response.Reason_Code == ReasonCodes.ProcessorTimeoutError)
                 {
                     Log.ForContext("decision", response.Decision).ForContext("reason", response.Reason_Code).Error("Bank Timeout Error");
-                    ErrorMessage = "Error contacting Credit Card issuing bank. Please wait a few minutes and try again. If you experience further problems, please contact us";
+                    rtValue.Errors.Add("Error contacting Credit Card issuing bank. Please wait a few minutes and try again. If you experience further problems, please contact us");
                 }
                 else
                 {
                     Log.ForContext("decision", response.Decision).ForContext("reason", response.Reason_Code).Warning("Declined Card Error");
-                    ErrorMessage = "Were sorry but your credit card was declined. Please use an alternative credit card and try submitting again. If you experience further problems, please contact us";
-                }
-
-                return RedirectToAction("Index", "Home");
+                    rtValue.Errors.Add("Were sorry but your credit card was declined. Please use an alternative credit card and try submitting again. If you experience further problems, please contact us");
+                }
             }

             // good cc info, partial payment
@@ -166,27 +191,19 @@
                 //TODO: credit card was partially billed. flag transaction for review
                 //TODO: send to general error page
                 Log.ForContext("decision", response.Decision).ForContext("reason", response.Reason_Code).Error("Partial Payment Error");
-                ErrorMessage = "Were sorry but a Partial Payment Error was detected. Please contact us";
-                return RedirectToAction("Index", "Home");
-            }
-
-            //Should be good,
-            if (response.Decision != ReplyCodes.Accept)
-            {
-                Log.Error("Got past all the other checks. But it still wasn't Accepted");
-            }
-            else
-            {
-                order.Status = OrderStatusCodes.Paid;
-                _context.SaveChanges(true);
-                Message = "Payment Processed. Thank You.";
-            }
-
-
-
-            ViewBag.PaymentDictionary = dictionary; //Debugging. Remove when not needed
-
-            return View(response);
+                rtValue.Errors.Add("Were sorry but a Partial Payment Error was detected. Please contact us");
+            }
+            if (rtValue.Errors.Count <= 0)
+            {
+                rtValue.IsValid = true;
+            }
+            return rtValue;
+        }
+
+        private class CheckResponseResults
+        {
+            public bool IsValid { get; set; } = false;
+            public IList<string> Errors { get; set; } = new List<string>();
         }

         [HttpPost]
@@ -266,6 +283,8 @@
                     {
                         order.Status = OrderStatusCodes.Paid;
                         _context.SaveChanges(true);
+
+                        //TODO: Generate Email
                     }
                 }
             }


Fix an issue that Rider is still used, even after disabling it.

DefaultApp is now lazy evaluated, so querying whether RiderPlugin is enabled should give the correct result.
Previously, the property was evaluated only once (when statics are initialised, probably on AppDomain reload).

--- Assets/Plugins/Editor/Rider/RiderPlugin.cs
+++ Assets/Plugins/Editor/Rider/RiderPlugin.cs
@@ -14,7 +14,11 @@
   public static class RiderPlugin
   {
     private static readonly string SlnFile;
-    private static readonly string DefaultApp = EditorPrefs.GetString("kScriptsDefaultApp");
+    private static readonly string DefaultApp
+    {
+      get { return EditorPrefs.GetString("kScriptsDefaultApp"); }
+    }
+
     public static readonly bool IsWindows;

     internal static bool Enabled


Removed check if subscriptionClient already exists since we need to refresh this if credentials change.

--- AutomationISE/Model/AutomationISEClient.cs
+++ AutomationISE/Model/AutomationISEClient.cs
@@ -63,12 +63,10 @@
         {
             if (azureADAuthResult == null)
                 throw new Exception("An Azure AD Authentication Result is needed to query Azure for subscriptions.");
-            if (subscriptionClient == null)  //lazy instantiation
-            {
-                if (cloudCredentials == null)
-                    subscriptionCredentials = new Microsoft.WindowsAzure.TokenCloudCredentials(azureADAuthResult.AccessToken);
-                subscriptionClient = new Microsoft.WindowsAzure.Subscriptions.SubscriptionClient(subscriptionCredentials);
-            }
+            if (cloudCredentials == null)
+                subscriptionCredentials = new Microsoft.WindowsAzure.TokenCloudCredentials(azureADAuthResult.AccessToken);
+            subscriptionClient = new Microsoft.WindowsAzure.Subscriptions.SubscriptionClient(subscriptionCredentials);
+
             var cancelToken = new CancellationToken();
             Microsoft.WindowsAzure.Subscriptions.Models.SubscriptionListOperationResponse subscriptionsResult = await subscriptionClient.Subscriptions.ListAsync(cancelToken);
             return subscriptionsResult.Subscriptions;


fix h3 in docs

fix h3 in docs

--- BForms.Docs/Views/Start/Setup/Index.cshtml
+++ BForms.Docs/Views/Start/Setup/Index.cshtml
@@ -27,17 +27,17 @@

Setup BForms for ASP.NET MVC step by step guide

-
1. NuGet

+
1. NuGet

                 Install BForms.MVC package via NuGet Manager onto your MVC project.
-                This process will include in Script folder BForms JS Framework and will add reference to BForms and to RequireJsNet assemblies.
+                This process will include in Script folder BForms JS Framework and will add reference to BForms and RequireJsNet assemblies.
                 The JavaScript and CSS components come in two forms, as individual files and as minified bundles.

 @Html.InsertFileContentCached("~/Views/Start/Setup/Source/_Files.embed")

-
2. Validation provider

+
2. Validation provider

                BForms comes with a custom validation provider, set it up in Global.asax file by adding the following line to Application_Start() method:

@@ -46,7 +46,7 @@
 @Html.InsertFileContentCached("~/Views/Start/Setup/Source/_Global.cs.embed")

-
3. Include CSS

+
3. Include CSS

                 Another step is to add BForms CSS file to your bundles. Go to RegisterBundles method in App_Start folder, in BundleConfig.cs file and add the following code:

@@ -65,7 +65,7 @@
 @Html.InsertFileContentCached("~/Views/Start/Setup/Source/_LayoutCss.cshtml.embed")

-
4. Include JS

+
4. Include JS

                 Next step is to include BForms javascript components in your project. There are two ways of working with BForms JS components,
                  one way is with RequireJS.NET (recommended ) or to reference javascript files directly from the ~/Scripts/Bforms/Bundles/js folder.
@@ -98,7 +98,7 @@
 @Html.InsertFileContentCached("~/Views/Start/Setup/Source/_BundleConfigJs.cs.embed")

-
5. RequireJS configuration

+
5. RequireJS configuration

                 First of all you need to remember this step is optional. You only need to do it if you want an extra configuration for your RequireJS.

@@ -138,7 +138,7 @@
                 Also you don't need to add .js extension.

-
Example

+
Example

                 Thumbs up ! Now that everything is set up you can start working on your new project. Let’s say you want to add a dropdown element somewhere in your application. Read the following steps and you’ll see how easy it is.


Small AI Shortcut Thinking tweak.

Small AI Shortcut Thinking tweak.

--- Assets/Scripts/AIPlayer.cs
+++ Assets/Scripts/AIPlayer.cs
@@ -10,7 +10,7 @@
     public static AILEVEL[] AiLevels =
         new AILEVEL[3] { AILEVEL.EASY, AILEVEL.MEDIUM, AILEVEL.HARD };

-    private bool aiThinkingShortcut = true;
+    private bool useAIThinkingShortcut = true;

     public bool canAffordAPiece { get; protected set; }
     public bool drawingPiece { get; protected set; }
@@ -362,7 +362,7 @@
     protected IEnumerator GeneratePossibleMoves()
     {
         //Debug.Log("starting to think at time " + Time.time);
-        string playerColor = playerNum == 1 ? "Red" : "Blue";
+        string playerColor = playerNum == 1 ? "Orange" : "Blue";
         isThinking = true;
         float thinkingOverride = (1 - resourceMeterFillAmt) / (resourceGainRate * resourceGainFactor) * 0.95f;
         float startTime = Time.time;
@@ -648,7 +648,7 @@
                         if (nextPlay != null) break;
                         piece.Rotate(false, true);
                         piece.SetTileCoords(sortedPlayableCoords[i]);
-                        piece.TurnOffGlow();
+                        //piece.TurnOffGlow();
                         if (rotations < numRotations)
                         {
                             movesTried++;
@@ -698,9 +698,9 @@
                     }

-                    if (aiThinkingShortcut &&
+                    if (useAIThinkingShortcut &&
                         movesToConsider.Count > 1 &&
-                        ((resources >= 1 && resourceMeterFillAmt > 0.5f)||
+                        ((resources >= 1 && resourceMeterFillAmt > 0.6f) ||
                        startTime - Time.time > thinkingOverride))
                     {
                         //  midthinking shortcut


Changing from GameUnit to GameObject.

Changing from GameUnit to GameObject.

--- Assets/Scripts/GameUnit.cs
+++ Assets/Scripts/GameUnit.cs
@@ -112,7 +112,7 @@
 			if (sight != null) {
 				if (sight.enemiesInRange.Count > 0) {
 					this.targetEnemy = sight.enemiesInRange[0];
-					CmdSetTargetEnemy(this);
+					CmdSetTargetEnemy(this.gameObject);
 				}
 				else {
 					this.targetEnemy = null;
@@ -183,13 +183,13 @@
 	}

 	[Command]
-	public void CmdSetTargetEnemy(GameUnit unit) {
+	public void CmdSetTargetEnemy(GameObject obj) {
 		Debug.Log("This command is working.");
-		RpcSetTargetEnemy(unit);
-	}
-
-	[ClientRpc]
-	public void RpcSetTargetEnemy(GameUnit unit) {
+		RpcSetTargetEnemy(obj);
+	}
+
+	[ClientRpc]
+	public void RpcSetTargetEnemy(GameObject obj) {
 		Debug.Log("This rpc is working.");
 		LineOfSight enemySight = this.targetEnemy.GetComponentInChildren<LineOfSight>();
 		if (enemySight != null) {


Fixed endlevel "reset" button

Fixed endlevel "reset" button

--- Assets/Scripts/Demos/DemoPlay.cs
+++ Assets/Scripts/Demos/DemoPlay.cs
@@ -74,7 +74,7 @@

 			if(nextFrameTime == -1f)
 			{
-				stopPlayback(true);
+				stopDemoPlayback(true);
 			}
 		}
 	}
@@ -104,7 +104,14 @@
 		playing = true;
 	}

-	public void stopPlayback(bool finished = false)
+	//Public stop, is always counted as an iterrupt
+	public void stopPlayback()
+	{
+		stopDemoPlayback(false);
+	}
+
+	//Private stop, finished will determine if the finishedplaying delegate will be called
+	private void stopDemoPlayback(bool finished)
 	{
 		playing = false;
 		GameObject.Destroy(ghost);


fixed expressions screwing up dialogue

fixed expressions screwing up dialogue

--- Assets/Scripts/DialogueScript.cs
+++ Assets/Scripts/DialogueScript.cs
@@ -144,8 +144,11 @@
     private void Checkchara(XmlNode node)
     {
         string character = node.Attributes["character"].Value;
-        int expression = int.Parse(node.Attributes["expression"].Value);
-        print(expression);
+        int expression = 0;
+        if(node.Attributes["expression"] != null)
+        {
+            expression = int.Parse(node.Attributes["expression"].Value);
+        }
         switch(character)
         {
             case "Gulnaz":


Moar fix.

Moar fix.

--- Assets/Scripts/PointBehaviour.cs
+++ Assets/Scripts/PointBehaviour.cs
@@ -72,6 +72,7 @@
         gameObject.GetComponent<RangeBehaviour>().enabled = true;
         gameObject.GetComponent<ShieldBehaviour>().enabled = false;
 		gameObject.GetComponent<ShieldHPBehaviour>().enabled = false;
+        gameObject.transform.Find("Base").GetComponent<Collider2D>().enabled = false;
     }

     public void deactivate()
@@ -80,7 +81,6 @@

         gameObject.GetComponent<Launcher>().enabled = false;
         gameObject.GetComponent<RangeBehaviour>().enabled = false;
-        gameObject.GetComponent<Collider2D>().enabled = false;
     }

     // Update is called once per frame


fix bug

fix bug

--- Assets/Scripts/TerrainManager.cs
+++ Assets/Scripts/TerrainManager.cs
@@ -107,7 +107,6 @@
         if (terrainCounter < SimonSpacing)
         {
             newPiece = Instantiate(Terrain_Prefabs[myRandIndex], position, Quaternion.identity) as GameObject;
-            success = false;
             terrainCounter++;
         }
         else
@@ -115,6 +114,7 @@
             terrainCounter = 0;
             newPiece = Instantiate(Simon_Terrain, position, Quaternion.identity) as GameObject;
             curr_Simon = newPiece;
+            success = false;
         }
         return newPiece.GetComponent<TerrainData>();
     }


Fix weird time speed changing jankyness

Fix weird time speed changing jankyness

--- Assets/Scripts/TickController.cs
+++ Assets/Scripts/TickController.cs
@@ -39,14 +39,17 @@
     }

     void Update() {
-        speedIndex = newSpeedIndex;
         if (speedIndex >= 0) {
-            if (Time.time - lastTickTimeSeconds >= 1 / TicksPerSecond[speedIndex]) {
-                if (ManipulateTickEvent != null)
-                    ManipulateTickEvent(1 / TicksPerSecond[speedIndex]);
-                if (MoveTickEvent != null)
-                    MoveTickEvent(1 / TicksPerSecond[speedIndex]);
-                this.lastTickTimeSeconds = Time.time;
+            if (Time.time - lastTickTimeSeconds >= 1 / TicksPerSecond[speedIndex]){
+                speedIndex = newSpeedIndex;
+                if (speedIndex >= 0)
+                {
+                    if (ManipulateTickEvent != null)
+                        ManipulateTickEvent(1 / TicksPerSecond[speedIndex]);
+                    if (MoveTickEvent != null)
+                        MoveTickEvent(1 / TicksPerSecond[speedIndex]);
+                    this.lastTickTimeSeconds = Time.time;
+                }
             }
         } else if (newSpeedIndex >= 0) {
             speedIndex = newSpeedIndex;


Fix Indentation spaces

Fix Indentation spaces

--- Assets/src/editor/ColorScheme.cs
+++ Assets/src/editor/ColorScheme.cs
@@ -4,45 +4,45 @@
 /// Syntax HighLight Code
 /// </summary>
 public static class ColorScheme
-{
-	/// <summary>
-	/// The color of the background.
-	/// </summary>
-	public static Color32 Background  = new Color32(42, 50, 50, 255);
-
-	/// <summary>
-	/// The background color2.
-	/// </summary>
-	public static Color32 Background2 = new Color32(34, 34, 34, 255);
-
-	/// <summary>
-	/// The background color3.
-	/// </summary>
-	public static Color32 Background3 = new Color32(39, 40, 34, 255);
-
-	/// <summary>
-	/// White Letters
-	/// </summary>
-	public static Color32 White  = new Color32(255, 255, 255, 255);
-
-	/// <summary>
-	/// Pink Keywords
-	/// </summary>
-	public static Color32 Pink   = new Color32(244, 0,   101, 255);
-
-	/// <summary>
-	/// Molokai Green
-	/// </summary>
-	public static Color32 Green  = new Color32(165, 255, 11 , 255);
-
-	/// <summary>
-	/// Orange Strings
-	/// </summary>
-	public static Color32 Orange = new Color32(237, 158, 38, 255);
-
-	/// <summary>
-	/// Comments
-	/// </summary>
-	public static Color32 Gray   = new Color32(100, 100, 100, 255);
-
+{
+    /// <summary>
+    /// The color of the background.
+    /// </summary>
+    public static Color32 Background  = new Color32(42, 50, 50, 255);
+
+    /// <summary>
+    /// The background color2.
+    /// </summary>
+    public static Color32 Background2 = new Color32(34, 34, 34, 255);
+
+    /// <summary>
+    /// The background color3.
+    /// </summary>
+    public static Color32 Background3 = new Color32(39, 40, 34, 255);
+
+    /// <summary>
+    /// White Letters
+    /// </summary>
+    public static Color32 White  = new Color32(255, 255, 255, 255);
+
+    /// <summary>
+    /// Pink Keywords
+    /// </summary>
+    public static Color32 Pink   = new Color32(244, 0,   101, 255);
+
+    /// <summary>
+    /// Molokai Green
+    /// </summary>
+    public static Color32 Green  = new Color32(165, 255, 11 , 255);
+
+    /// <summary>
+    /// Orange Strings
+    /// </summary>
+    public static Color32 Orange = new Color32(237, 158, 38, 255);
+
+    /// <summary>
+    /// Comments
+    /// </summary>
+    public static Color32 Gray   = new Color32(100, 100, 100, 255);
+
 }


Implemented profile Settings, added player age formating

--- GameUi/Areas/Game/Controllers/ProfileController.cs
+++ GameUi/Areas/Game/Controllers/ProfileController.cs
@@ -70,19 +70,60 @@
             tabView.ViewBag.avatarID = currentLevel.LevelID;

             //player game age
-            tabView.ViewBag.playerGameAge = 0; //todo: implement
+            tabView.ViewBag.playerGameAge = FormatInGameAge(DateTime.Now - player.AddedDate);

             return tabView;
         }

-        public PartialViewResult Personal()
-        {
-            return GetTabView("Personal");
-        }
-
+        /// <summary>
+        /// Gets user settings from database and displays them to user.
+        /// </summary>
+        /// <returns></returns>
         public PartialViewResult Settings()
         {
-            return GetTabView("Settings");
+            Models.ProfileSettingsModel model = new Models.ProfileSettingsModel();
+            Player player = GSClient.PlayerService.GetPlayer(getCurrentPlayerId());
+
+            model.Email = player.Email;
+            model.RememberMe = player.StayLogedIn;
+            model.SendGameInfo = player.SendInGameInfo;
+            model.SendNews = player.SendNewsletter;
+
+            return GetTabView("Settings", model);
+        }
+
+        /// <summary>
+        /// Saves user settings to database.
+        /// If successful, displays success message to user, otherwise displays error message to user.
+        /// </summary>
+        /// <param name="model">ProfileSettingsModel model</param>
+        /// <returns></returns>
+        [HttpPost]
+        [ValidateAntiForgeryToken]
+        public ActionResult Settings(Models.ProfileSettingsModel model)
+        {
+            if(ModelState.IsValid)
+            {
+                //SpaceTraffic.Utils.Debugging.DebugEx.WriteLineF("PlayerUpdate begin: rem:" + model.RememberMe + ", GInfo: " + model.SendGameInfo + ", SNews: " + model.SendNews);
+                Player player = GSClient.PlayerService.GetPlayer(getCurrentPlayerId());
+
+                player.StayLogedIn = model.RememberMe;
+                player.SendInGameInfo = model.SendGameInfo;
+                player.SendNewsletter = model.SendNews;
+
+                bool state = GSClient.AccountService.UpdatePlayer(player);
+
+                if(state)
+                {
+                    return JavaScript("$('a[title=\"Nastavení\"]').click();").Success("Nastavení bylo uloženo.");
+                }
+                else
+                {
+                    return JavaScript("$('a[title=\"Nastavení\"]').click();").Error("Při ukládání nastala chyba.");
+                }
+            }
+
+            return GetTabView("Settings", model);
         }

         public PartialViewResult Achievements()


Finished message controller

Finished message controller


Finished refactoring contracted edge-based dykstra for multi-weights.

--- Itinero/Algorithms/Contracted/EdgeBased/Dykstra.cs
+++ Itinero/Algorithms/Contracted/EdgeBased/Dykstra.cs
@@ -17,7 +17,7 @@
 // along with Itinero. If not, see <http://www.gnu.org/licenses/>.

 using Itinero.Algorithms.PriorityQueues;
-using Itinero.Data.Contracted.Edges;
+using Itinero.Algorithms.Weights;
 using Itinero.Graphs.Directed;
 using System;
 using System.Collections.Generic;
@@ -27,26 +27,29 @@
     /// <summary>
     /// An implementation of the dykstra routing algorithm.
     /// </summary>
-    public class Dykstra : AlgorithmBase
+    public class Dykstra<T> : AlgorithmBase
+        where T : struct
     {
         private readonly DirectedDynamicGraph _graph;
-        private readonly IEnumerable<EdgePath<float>> _sources;
+        private readonly IEnumerable<EdgePath<T>> _sources;
         private readonly bool _backward;
+        private readonly WeightHandler<T> _weightHandler;

         /// <summary>
         /// Creates a new routing algorithm instance.
         /// </summary>
-        public Dykstra(DirectedDynamicGraph graph, IEnumerable<EdgePath<float>> sources, bool backward)
+        public Dykstra(DirectedDynamicGraph graph, WeightHandler<T> weightHandler, IEnumerable<EdgePath<T>> sources, bool backward)
         {
             _graph = graph;
             _sources = sources;
             _backward = backward;
+            _weightHandler = weightHandler;
         }

         private DirectedDynamicGraph.EdgeEnumerator _edgeEnumerator;
-        private Dictionary<uint, EdgePath<float>> _visits;
-        private EdgePath<float> _current;
-        private BinaryHeap<EdgePath<float>> _heap;
+        private Dictionary<uint, EdgePath<T>> _visits;
+        private EdgePath<T> _current;
+        private BinaryHeap<EdgePath<T>> _heap;

         /// <summary>
         /// Executes the actual run of the algorithm.
@@ -69,13 +72,13 @@
             this.HasSucceeded = true;

             // intialize dykstra data structures.
-            _visits = new Dictionary<uint, EdgePath<float>>();
-            _heap = new BinaryHeap<EdgePath<float>>();
+            _visits = new Dictionary<uint, EdgePath<T>>();
+            _heap = new BinaryHeap<EdgePath<T>>();

             // queue all sources.
             foreach (var source in _sources)
             {
-                _heap.Push(source, source.Weight);
+                _heap.Push(source, _weightHandler.GetMetric(source.Weight));
             }

             // gets the edge enumerator.
@@ -117,17 +120,17 @@
             _edgeEnumerator.MoveTo(_current.Vertex);
             while (_edgeEnumerator.MoveNext())
             {
-                float neighbourWeight;
                 bool? neighbourDirection;
-                ContractedEdgeDataSerializer.Deserialize(_edgeEnumerator.Data0, out neighbourWeight, out neighbourDirection);
+                var neighbourWeight = _weightHandler.GetEdgeWeight(_edgeEnumerator.Current, out neighbourDirection);
+
                 if (neighbourDirection == null || neighbourDirection.Value == !_backward)
                 { // the edge is forward, and is to higher or was not contracted at all.
                     var neighbourNeighbour = _edgeEnumerator.Neighbour;
                     if (!_visits.ContainsKey(neighbourNeighbour))
                     { // if not yet settled.
-                        var routeToNeighbour = new EdgePath<float>(
-                            neighbourNeighbour, _current.Weight + neighbourWeight, _current);
-                        _heap.Push(routeToNeighbour, routeToNeighbour.Weight);
+                        var routeToNeighbour = new EdgePath<T>(
+                            neighbourNeighbour, _weightHandler.Add(_current.Weight, neighbourWeight), _current);
+                        _heap.Push(routeToNeighbour, _weightHandler.GetMetric(routeToNeighbour.Weight));
                     }
                 }
             }
@@ -138,7 +141,7 @@
         /// Returns true if the given vertex was visited and sets the visit output parameters with the actual visit data.
         /// </summary>
         /// <returns></returns>
-        public bool TryGetVisit(uint vertex, out EdgePath<float> visit)
+        public bool TryGetVisit(uint vertex, out EdgePath<T> visit)
         {
             return _visits.TryGetValue(vertex, out visit);
         }
@@ -146,7 +149,7 @@
         /// <summary>
         /// Gets or sets the wasfound function to be called when a new vertex is found.
         /// </summary>
-        public Func<uint, float, bool> WasFound
+        public Func<uint, T, bool> WasFound
         {
             get;
             set;
@@ -177,12 +180,27 @@
         /// <summary>
         /// Gets the current.
         /// </summary>
-        public EdgePath<float> Current
+        public EdgePath<T> Current
         {
             get
             {
                 return _current;
             }
+        }
+    }
+
+    /// <summary>
+    /// An implementation of the dykstra routing algorithm.
+    /// </summary>
+    public sealed class Dykstra : Dykstra<float>
+    {
+        /// <summary>
+        /// Creates a new routing algorithm instance.
+        /// </summary>
+        public Dykstra(DirectedDynamicGraph graph, IEnumerable<EdgePath<float>> sources, bool backward)
+            : base(graph, new DefaultWeightHandler(null), sources, backward)
+        {
+
         }
     }
 }


Fix crash on Search box enter

Fix crash on Search box enter

--- Brofiler/SearchBox.xaml.cs
+++ Brofiler/SearchBox.xaml.cs
@@ -64,7 +64,7 @@
 		{
 			if (e.Key == Key.Enter || e.SystemKey == Key.Enter)
 			{
-				TextEnter(FilterText.Text);
+				TextEnter?.Invoke(FilterText.Text);
 			}
 		}


Restart karma if it fails

Restart karma if it fails

--- KarmaTestAdapter/TestAdapter/KarmaTestContainer.cs
+++ KarmaTestAdapter/TestAdapter/KarmaTestContainer.cs
@@ -168,16 +168,20 @@

         private void OnServerStopped(int? exitCode, Exception ex)
         {
-            SetIsValid(false, "Karma stopped");
             if (ex != null)
             {
                 Logger.Error(ex, "Karma stopped");
             }
+            else if (IsValid)
+            {
+                Logger.Warn("Karma stopped - exit code: {0}", exitCode);
+                Logger.Warn("Restarting karma");
+                Task.Delay(250).ContinueWith(t => StartKarmaServer());
+            }
             else
             {
                 Logger.Debug("Karma stopped - exit code: {0}", exitCode);
             }
-            RefreshContainer("Karma stopped");
         }

         private bool _refreshing = false;


Update memory offset for the Midnight Skypetal Plains (2016/11/16) patch.

--- BnS_ACT_Plugin/BNS_ACT_Plugin.cs
+++ BnS_ACT_Plugin/BNS_ACT_Plugin.cs
@@ -335,7 +335,7 @@
             }
         }

-        private const Int32 chatlogOffset = 0x00EAF980;
+        private const Int32 chatlogOffset = 0x00EB1A40;

         private static void Scan()
         {


Typos corrected

Typos corrected


refactoring

refactoring

--- LatencyCollectorService/LatencyCollectorService.cs
+++ LatencyCollectorService/LatencyCollectorService.cs
@@ -141,8 +141,14 @@
 			{
 				InvokeCrossDomain(newDomain, "Start");
 			}
-			catch (Exception)
-			{
+			catch (AppDomainUnloadedException exc)
+			{
+				Report(exc);
+				newDomain = null;
+			}
+			catch (Exception exc)
+			{
+				Report(exc);
 				AppDomain.Unload(newDomain);
 				throw;
 			}
@@ -175,6 +181,19 @@

 		private void EnsureWorkerDomainStarted()
 		{
+			if (_appDomain != null)
+			{
+				try
+				{
+					var tmp = _appDomain.Id;
+				}
+				catch (AppDomainUnloadedException exc)
+				{
+					Report(exc);
+					_appDomain = null;
+				}
+			}
+
 			if (_appDomain == null)
 				StartWorkerDomain();
 		}


Examples for Adress string

Examples for Adress string

--- LibNoDaveConnectionLibrary/Communication/PLCTag.cs
+++ LibNoDaveConnectionLibrary/Communication/PLCTag.cs
@@ -178,7 +178,15 @@
         /// <summary>
         /// Create an new PLC Tag
         /// </summary>
-        /// <param name="address">The Simatic Address for the data in the controller such as: "DB23.DBW0"; "DB67.DBX8.0 Byte9" (for Arrays); "M0.2"; "MB8"; "T8"</param>
+        /// <param name="address">The Simatic Address for the data in the controller such as:
+        /// Inputs: I4.0, IB4, IW4 , ID4
+        /// Outputs: Q124.0, QB124, QW124, QD124
+        /// Markers: M11.0, MB10, MW10, MD10
+        /// Timers: T34
+        /// Counters: C23
+        /// Data Block: DB5.DBX2.0, DB5.DBW6
+        /// Arrays and String: "P#DB25.DBX0.0 BYTE 14"; "P#M0.0 WORD 2"; "P#I0.0 DWORD 5"
+        ///</param>
         /// <param name="type">The data type to be read from the Controller</param>
         public PLCTag(string address, TagDataType type)
         {


Added `File.Copy(string, string, bool)`.

--- MarkerMetro.Unity.WinLegacyUnity/System/IO/File.cs
+++ MarkerMetro.Unity.WinLegacyUnity/System/IO/File.cs
@@ -137,6 +137,15 @@
 #endif
         }

+        public static void Copy(string sourceFileName, string destFileName, bool overwrite)
+        {
+#if NETFX_CORE
+            CopyAsync(sourceFileName, destFileName, overwrite).Wait();
+#else
+            throw new NotImplementedException();
+#endif
+        }
+
         public static void Delete(string path)
         {
 #if NETFX_CORE


fixed minor issues

fixed minor issues

--- MyHoard/MyHoard/Services/SynchronizationService.cs
+++ MyHoard/MyHoard/Services/SynchronizationService.cs
@@ -266,10 +266,13 @@
                     Name = serverItem.name,
                     Description = serverItem.description,
                     CollectionId = collectionId,
-                    LocationLat = serverItem.location.lat,
-                    LocationLng = serverItem.location.lng,
                     ModifiedDate = serverItem.ModifiedDate(),
                 };
+                if(serverItem.location != null)
+                {
+                    localItem.LocationLat = serverItem.location.lat;
+                    localItem.LocationLng = serverItem.location.lng;
+                }
                 localItem.SetServerId(serverItem.id, backend);
                 localItem.SetSynced(true, backend);
                 return itemService.AddItem(localItem);
@@ -278,8 +281,11 @@
             {
                 localItem.Name = serverItem.name;
                 localItem.Description = serverItem.description;
-                localItem.LocationLat = serverItem.location.lat;
-                localItem.LocationLng = serverItem.location.lng;
+                if (serverItem.location != null)
+                {
+                    localItem.LocationLat = serverItem.location.lat;
+                    localItem.LocationLng = serverItem.location.lng;
+                }
                 localItem.ModifiedDate = serverItem.ModifiedDate();
                 localItem.SetSynced(true, backend);
                 return itemService.ModifyItem(localItem);
@@ -470,7 +476,7 @@
             {
                 name = i.Name,
                 description = i.Description,
-                location = new { lat = i.LocationLat, lng = i.LocationLng },
+                //location = new { lat = i.LocationLat, lng = i.LocationLng },
                 media = mediaService.MediaStringList(i.Id, backend),
                 collection = parentServerId
             });


Swedish SSN fix

Swedish SSN fix

--- NExtra/ValidationAttributes/SwedishSsnAttribute.cs
+++ NExtra/ValidationAttributes/SwedishSsnAttribute.cs
@@ -34,10 +34,8 @@

 		public override bool IsValid(object value)
 		{
-            if (value == null)
-                return false;
-
-            if (!base.IsValid(value))
+            //Abort instewad of failing for missing data
+            if (value == null || !base.IsValid(value))
                 return false;

             //Remove possible dash


commit UI detail page

commit UI detail page

--- CarFuel/Views/Car/Details.cshtml
+++ CarFuel/Views/Car/Details.cshtml
@@ -6,8 +6,7 @@

     @if (Model.AverageKmL == null)
     {
-

-            Not has enough data to calculate consumption rate.
+
Not has enough data to calculate consumption rate.
             Please add more fill up.

     }


Added the #IF Linux around the using statement on the SqliteModule (Build is using Windows Server currently).

--- NZBDash.DependencyResolver.Modules/SqliteModule.cs
+++ NZBDash.DependencyResolver.Modules/SqliteModule.cs
@@ -1,7 +1,9 @@
 using System.Data.Common;
 using System.Data.SQLite;

+#if LINUX
 using Mono.Data.Sqlite;
+#endif

 using Ninject.Modules;
 using NZBDash.Common.Models.Data.Models;


SetPropertyChangedCallback method renamed to RegisterPropertyChangedCallback and the PropertyData.PropertyChangedCallback member is now an event, added UnregisterPropertyChangedCallback method

--- NotifyPropertyChangedBase/NotifyPropertyChanged.cs
+++ NotifyPropertyChangedBase/NotifyPropertyChanged.cs
@@ -104,10 +104,10 @@
         }

         /// <summary>
-        /// Sets new <see cref="PropertyChangedCallbackHandler"/> to a registered property.
-        /// </summary>
-        /// <param name="propertyName">Name of the property.</param>
-        /// <param name="propertyChangedCallback"><see cref="PropertyChangedCallbackHandler"/> to be added.</param>
+        /// Registers the <paramref name="propertyChangedCallback"/> as a <see cref="PropertyChangedCallbackHandler"/> to a registered property.
+        /// </summary>
+        /// <param name="propertyName">Name of the property.</param>
+        /// <param name="propertyChangedCallback"><see cref="PropertyChangedCallbackHandler"/> to be registered.</param>
         /// <exception cref="ArgumentNullException">
         ///     <para>
         ///         Parameter <paramref name="propertyName"/> is <c>null</c> or white space.
@@ -119,12 +119,34 @@
         ///         Parameter <paramref name="propertyChangedCallback"/> is <c>null</c>.
         ///     </para>
         /// </exception>
-        protected void SetPropertyChangedCallback(string propertyName, PropertyChangedCallbackHandler propertyChangedCallback)
+        protected void RegisterPropertyChangedCallback(string propertyName, PropertyChangedCallbackHandler propertyChangedCallback)
         {
             Helpers.ValidateNotNull(propertyChangedCallback, nameof(propertyChangedCallback));
-            GetPropertyData(propertyName, nameof(propertyName)).PropertyChangedCallback = propertyChangedCallback;
-        }
-
+            GetPropertyData(propertyName, nameof(propertyName)).PropertyChangedCallback += propertyChangedCallback;
+        }
+
+        /// <summary>
+        /// Unregisters the <paramref name="propertyChangedCallback"/> from a registered property.
+        /// </summary>
+        /// <param name="propertyName">Name of the property.</param>
+        /// <param name="propertyChangedCallback"><see cref="PropertyChangedCallbackHandler"/> to be unregistered.</param>
+        /// <exception cref="ArgumentNullException">
+        ///     <para>
+        ///         Parameter <paramref name="propertyName"/> is <c>null</c> or white space.
+        ///     </para>
+        ///     <para>
+        ///         Actual instance does not contain registered property with name specified in the <paramref name="propertyName"/> parameter.
+        ///     </para>
+        ///     <para>
+        ///         Parameter <paramref name="propertyChangedCallback"/> is <c>null</c>.
+        ///     </para>
+        /// </exception>
+        protected void UnregisterPropertyChangedCallback(string propertyName, PropertyChangedCallbackHandler propertyChangedCallback)
+        {
+            Helpers.ValidateNotNull(propertyChangedCallback, nameof(propertyChangedCallback));
+            GetPropertyData(propertyName, nameof(propertyName)).PropertyChangedCallback -= propertyChangedCallback;
+        }
+
         /// <summary>
         /// Returns the current value of a registered property.
         /// </summary>
@@ -215,7 +237,7 @@

                 if (IsPropertyChangedCallbackInvokingEnabled)
                 {
-                    propertyData.PropertyChangedCallback?.Invoke(this, new PropertyChangedCallbackArgs(oldValue, value));
+                    propertyData.InvokePropertyChangedCallback(this, new PropertyChangedCallbackArgs(oldValue, value));
                 }

                 if (IsPropertyChangedEventInvokingEnabled)
@@ -276,13 +298,19 @@
         {
             internal object Value { get; set; }
             internal Type Type { get; }
-            internal PropertyChangedCallbackHandler PropertyChangedCallback { get; set; }
+
+            internal event PropertyChangedCallbackHandler PropertyChangedCallback;

             internal PropertyData(object defaultValue, Type type, PropertyChangedCallbackHandler propertyChangedCallback)
             {
                 Value                   = defaultValue;
                 Type                    = type;
-                PropertyChangedCallback = propertyChangedCallback;
+                PropertyChangedCallback += propertyChangedCallback;
+            }
+
+            internal void InvokePropertyChangedCallback(NotifyPropertyChanged sender, PropertyChangedCallbackArgs e)
+            {
+                PropertyChangedCallback?.Invoke(sender, e);
             }
         }
     }


Fixed a problem where some prims didn't show up when you crossed or teleported into another region.

--- OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -221,6 +221,7 @@
             this._physActor.Flying = isFlying;
             this.newAvatar = true;
             this.childAgent = false;
+            this.m_scene.SendAllSceneObjectsToClient(this.ControllingClient);
         }

         protected void MakeChildAgent()
@@ -282,6 +283,8 @@
             if (this.childAgent)
             {
                 this.childAgent = false;
+
+                //this.m_scene.SendAllSceneObjectsToClient(this.ControllingClient);
             }
         }


* Fix the string substitutions in the last commit

--- OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -596,7 +596,7 @@
                 LLVector3 emergencyPos = new LLVector3(128, 128, 128);

                 m_log.WarnFormat(
-                    "[SCENE PRESENCE]: MakeRootAgent() was given an illegal position of {0} for avatar {2}, {3}.  Substituting {4}",
+                    "[SCENE PRESENCE]: MakeRootAgent() was given an illegal position of {0} for avatar {1}, {2}.  Substituting {3}",
                     pos, Name, UUID, emergencyPos);

                 pos = emergencyPos;


Document more.

Document more.

--- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -46,6 +46,10 @@
 {
     public interface ILLClientInventory
     {
+        /// <summary>
+        /// The default LSL script that will be added when a client creates
+        /// a new script in inventory or in the task object inventory
+        /// </summary>
         string DefaultLSLScript { get; set; }

         /// <summary>
@@ -155,6 +159,10 @@

         protected string m_DefaultLSLScript = "default\n{\n    state_entry()\n    {\n        llSay(0, \"Script running.\");\n    }\n    touch_start(integer number)\n    {\n        llSay(0,\"Touched.\");\n    }\n}\n";

+        /// <summary>
+        /// The default LSL script that will be added when a client creates
+        /// a new script in inventory or in the task object inventory
+        /// </summary>
         public string DefaultLSLScript
         {
             get { return m_DefaultLSLScript; }
@@ -213,6 +221,10 @@

         #region Client events

+        /// <summary>
+        /// Hook up to the client inventory events
+        /// </summary>
+        /// <param name="client"></param>
         protected void EventManager_OnNewClient(IClientAPI client)
         {
             client.OnCreateNewInventoryItem += CreateNewInventoryItem;
@@ -233,10 +245,14 @@
             client.OnRequestTaskInventory += RequestTaskInventory;
             client.OnRemoveTaskItem += RemoveTaskInventory;
             client.OnUpdateTaskInventory += UpdateTaskInventory;
-            client.OnMoveTaskItem += ClientMoveTaskInventoryItem;
+            client.OnMoveTaskItem += ClientMoveTaskInventoryItemToUserInventory;
             client.OnDeRezObject += DeRezObjects;
         }

+        /// <summary>
+        /// Remove ourselves from the inventory events
+        /// </summary>
+        /// <param name="client"></param>
         protected void EventManager_OnClosingClient(IClientAPI client)
         {
             client.OnCreateNewInventoryItem -= CreateNewInventoryItem;
@@ -255,7 +271,7 @@
             client.OnRequestTaskInventory -= RequestTaskInventory;
             client.OnRemoveTaskItem -= RemoveTaskInventory;
             client.OnUpdateTaskInventory -= UpdateTaskInventory;
-            client.OnMoveTaskItem -= ClientMoveTaskInventoryItem;
+            client.OnMoveTaskItem -= ClientMoveTaskInventoryItemToUserInventory;
             client.OnDeRezObject -= DeRezObjects;
         }

@@ -370,6 +386,12 @@
             }
         }

+        /// <summary>
+        /// Move the inventory folder to another place in the user's inventory
+        /// </summary>
+        /// <param name="remoteClient">The client that requested the change</param>
+        /// <param name="folderID">The folder UUID to move</param>
+        /// <param name="parentID">The folder to move the folder (folderID) into</param>
         protected void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
         {
             InventoryFolderBase folder = new InventoryFolderBase(folderID, remoteClient.AgentId);
@@ -407,6 +429,14 @@
                 m_log.WarnFormat("[AGENT INVENTORY]: could not purge folder {0} for client {1}", ((InventoryFolderBase)folder).ID, ((InventoryFolderBase)folder).Owner);
         }

+        /// <summary>
+        /// Delete the given objects from the Scene and move them into the client's inventory
+        /// </summary>
+        /// <param name="remoteClient">The client requesting the change (can be null if returning objects)</param>
+        /// <param name="localIDs">A list of all the localIDs of the groups to delete</param>
+        /// <param name="groupID">the GroupID of the objects</param>
+        /// <param name="action">What type of action is causing this</param>
+        /// <param name="destinationID">The folder ID to put the inventory items in</param>
         protected void DeRezObjects(IClientAPI remoteClient, List<uint> localIDs,
                 UUID groupID, DeRezAction action, UUID destinationID)
         {
@@ -682,6 +712,19 @@
             }
         }

+        /// <summary>
+        /// Create a new 'link' to another inventory item
+        /// Used in Viewer 2 for appearance.
+        /// </summary>
+        /// <param name="remoteClient"></param>
+        /// <param name="transActionID"></param>
+        /// <param name="folderID"></param>
+        /// <param name="callbackID"></param>
+        /// <param name="description"></param>
+        /// <param name="name"></param>
+        /// <param name="invType"></param>
+        /// <param name="type"></param>
+        /// <param name="olditemID"></param>
         protected void HandleLinkInventoryItem(IClientAPI remoteClient, UUID transActionID, UUID folderID,
                                              uint callbackID, string description, string name,
                                              sbyte invType, sbyte type, UUID olditemID)
@@ -730,6 +773,15 @@
                 m_log.Warn("[AGENT INVENTORY]: Failed to move items for user " + remoteClient.AgentId);
         }

+        /// <summary>
+        /// Copy an inventory item in the user's inventory
+        /// </summary>
+        /// <param name="remoteClient"></param>
+        /// <param name="callbackID"></param>
+        /// <param name="oldAgentID"></param>
+        /// <param name="oldItemID"></param>
+        /// <param name="newFolderID"></param>
+        /// <param name="newName"></param>
         protected void CopyInventoryItem(IClientAPI remoteClient, uint callbackID, UUID oldAgentID, UUID oldItemID,
                                       UUID newFolderID, string newName)
         {
@@ -852,6 +904,12 @@
             }
         }

+        /// <summary>
+        /// Change an inventory items flags
+        /// </summary>
+        /// <param name="remoteClient"></param>
+        /// <param name="itemID"></param>
+        /// <param name="Flags"></param>
         protected void ChangeInventoryItemFlags(IClientAPI remoteClient, UUID itemID, uint Flags)
         {
             InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
@@ -944,13 +1002,13 @@
         #region Move

         /// <summary>
-        /// <see>ClientMoveTaskInventoryItem</see>
-        /// </summary>
-        /// <param name="remoteClient"></param>
-        /// <param name="folderID"></param>
-        /// <param name="primLocalID"></param>
-        /// <param name="itemID"></param>
-        protected void ClientMoveTaskInventoryItem(IClientAPI remoteClient, UUID folderId, uint primLocalId, UUID itemId)
+        /// Move the inventory folder to another place in the user's inventory
+        /// </summary>
+        /// <param name="remoteClient">The client that requested the change</param>
+        /// <param name="folderID">The folderID that the task (object) item will be moved into</param>
+        /// <param name="primLocalID">The localID of the prim the item is in</param>
+        /// <param name="itemID">The UUID of the item to move</param>
+        protected void ClientMoveTaskInventoryItemToUserInventory(IClientAPI remoteClient, UUID folderId, uint primLocalId, UUID itemId)
         {
             SceneObjectPart part = m_scene.GetSceneObjectPart(primLocalId);

@@ -1023,6 +1081,13 @@

         #endregion

+        /// <summary>
+        /// Send an update to the client about the given folder
+        /// </summary>
+        /// <param name="client">The client to send the update to</param>
+        /// <param name="folder">The folder that we need to send</param>
+        /// <param name="fetchFolders">Should we fetch folders inside of this folder</param>
+        /// <param name="fetchItems">Should we fetch items inside of this folder</param>
         protected void SendInventoryUpdate(IClientAPI client, InventoryFolderBase folder, bool fetchFolders, bool fetchItems)
         {
             if (folder == null)
@@ -1268,6 +1333,13 @@

         #endregion

+        /// <summary>
+        /// Change a task inventory item to a user inventory item
+        /// </summary>
+        /// <param name="destAgent">The agent who will own the inventory item</param>
+        /// <param name="part">The object that the item is in</param>
+        /// <param name="itemId">The item to convert</param>
+        /// <returns></returns>
         private InventoryItemBase CreateAgentInventoryItemFromTask(UUID destAgent, SceneObjectPart part, UUID itemId)
         {
             TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId);


Set _isConnected to false when failing to parse address (#2058)

--- Content.Client/State/MainMenu.cs
+++ Content.Client/State/MainMenu.cs
@@ -131,6 +131,7 @@
                 _userInterfaceManager.Popup($"Unable to connect: {e.Message}", "Connection error.");
                 Logger.Warning(e.ToString());
                 _netManager.ConnectFailed -= _onConnectFailed;
+                _setConnectingState(false);
             }
         }


refuse to do a inventory link if provided asset type is not a link or  folderlink

--- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1062,6 +1062,10 @@

             if (!Permissions.CanCreateUserInventory(invType, remoteClient.AgentId))
                 return;
+
+            if (type != (sbyte)AssetType.Link || type != (sbyte)AssetType.LinkFolder)
+                return;
+

             ScenePresence presence;
             if (TryGetScenePresence(remoteClient.AgentId, out presence))


Replace BuildWebHost => CreatewebHostBuilder to support integration testing

--- ContosoUniversity.Web/Program.cs
+++ ContosoUniversity.Web/Program.cs
@@ -10,15 +10,16 @@
     {
         public static void Main(string[] args)
         {
-            BuildWebHost(args).Run();
+            CreateWebHostBuilder(args).Build().Run();
         }

-        public static IWebHost BuildWebHost(string[] args) =>
+        // netcoreapp2.1 code-based idiom to support integration test infrastructor
+        // https://docs.microsoft.com/en-us/aspnet/core/migration/20_21?view=aspnetcore-3.1
+        public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
             WebHost.CreateDefaultBuilder(args)
                 .ConfigureAppConfiguration(ConfigConfiguration)
                 .ConfigureLogging(ConfigureLogger)
-                .UseStartup<Startup>()
-                .Build();
+                .UseStartup<Startup>();

         // refs:
         // https://wildermuth.com/2017/07/06/Program-cs-in-ASP-NET-Core-2-0
@@ -26,12 +27,12 @@
         {
             config.SetBasePath(Directory.GetCurrentDirectory());

-            if (context.HostingEnvironment.IsDevelopment())
+            if (context.HostingEnvironment.IsDevelopment())
             {
                 config.AddJsonFile($"sampleData.json", optional: true, reloadOnChange: false);
                 config.AddUserSecrets<Startup>();
             }
-
+
             config.AddEnvironmentVariables();
         }