Added documentation to PackageArchiveSummaryData

--- OpenIIoT.Core/Packaging/WebApi/Data/PackageArchiveSummaryData.cs
+++ OpenIIoT.Core/Packaging/WebApi/Data/PackageArchiveSummaryData.cs
@@ -1,4 +1,45 @@
-namespace OpenIIoT.Core.Packaging.WebApi.Data
+/*
+      █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀  ▀  ▀      ▀▀
+      █
+      █      ▄███████▄                                                                ▄████████                                                          ▄████████                                                            ████████▄
+      █     ███    ███                                                                ███    ███                                                        ███    ███                                                            ███   ▀███
+      █     ███    ███   ▄█████   ▄██████    █  █▄     ▄█████     ▄████▄     ▄█████   ███    ███    █████  ▄██████   ██   █     █   █    █     ▄█████   ███    █▀  ██   █     ▄▄██▄▄▄     ▄▄██▄▄▄    ▄█████     █████ ▄█   ▄  ███    ███   ▄█████      ██      ▄█████
+      █     ███    ███   ██   ██ ██    ██   ██ ▄██▀    ██   ██   ██    ▀    ██   █    ███    ███   ██  ██ ██    ██   ██   ██   ██  ██    ██   ██   █    ███        ██   ██  ▄█▀▀██▀▀█▄  ▄█▀▀██▀▀█▄   ██   ██   ██  ██ ██   █▄ ███    ███   ██   ██ ▀███████▄   ██   ██
+      █   ▀█████████▀    ██   ██ ██    ▀    ██▐█▀      ██   ██  ▄██        ▄██▄▄    ▀███████████  ▄██▄▄█▀ ██    ▀   ▄██▄▄▄██▄▄ ██▌ ██    ██  ▄██▄▄    ▀███████████ ██   ██  ██  ██  ██  ██  ██  ██   ██   ██  ▄██▄▄█▀ ▀▀▀▀▀██ ███    ███   ██   ██     ██  ▀   ██   ██
+      █     ███        ▀████████ ██    ▄  ▀▀████     ▀████████ ▀▀██ ███▄  ▀▀██▀▀      ███    ███ ▀███████ ██    ▄  ▀▀██▀▀▀██▀  ██  ██    ██ ▀▀██▀▀             ███ ██   ██  ██  ██  ██  ██  ██  ██ ▀████████ ▀███████ ▄█   ██ ███    ███ ▀████████     ██    ▀████████
+      █     ███          ██   ██ ██    ██   ██ ▀██▄    ██   ██   ██    ██   ██   █    ███    ███   ██  ██ ██    ██   ██   ██   ██   █▄  ▄█    ██   █     ▄█    ███ ██   ██  ██  ██  ██  ██  ██  ██   ██   ██   ██  ██ ██   ██ ███   ▄███   ██   ██     ██      ██   ██
+      █    ▄████▀        ██   █▀ ██████▀    ▀█   ▀█▀   ██   █▀   ██████▀    ███████   ███    █▀    ██  ██ ██████▀    ██   ██   █     ▀██▀     ███████  ▄████████▀  ██████    █  ██  █    █  ██  █    ██   █▀   ██  ██  █████  ████████▀    ██   █▀    ▄██▀     ██   █▀
+      █
+ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄  ▄▄ ▄▄   ▄▄▄▄ ▄▄     ▄▄     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄
+ █████████████████████████████████████████████████████████████ ███████████████ ██  ██ ██   ████ ██     ██     ████████████████ █ █
+      ▄
+      █  Data Transfer Object used when returning Package Archive objects.
+      █
+      █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀     ▀▀               ▀
+      █  The GNU Affero General Public License (GNU AGPL)
+      █
+      █  Copyright (C) 2016-2017 JP Dillingham (jp@dillingham.ws)
+      █
+      █  This program is free software: you can redistribute it and/or modify
+      █  it under the terms of the GNU Affero General Public License as published by
+      █  the Free Software Foundation, either version 3 of the License, or
+      █  (at your option) any later version.
+      █
+      █  This program is distributed in the hope that it will be useful,
+      █  but WITHOUT ANY WARRANTY; without even the implied warranty of
+      █  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+      █  GNU Affero General Public License for more details.
+      █
+      █  You should have received a copy of the GNU Affero General Public License
+      █  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+      █
+      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██
+                                                                                ██
+                                                                                ▀█▄ ██ ▄█▀
+                                                                                ▀████▀
+                                                                                ▀▀                            */
+
+namespace OpenIIoT.Core.Packaging.WebApi.Data
 {
     using System;
     using System.Runtime.Serialization;
@@ -6,11 +47,18 @@
     using OpenIIoT.SDK.Common;
     using OpenIIoT.SDK.Packaging;

+    /// <summary>
+    ///     Data Transfer Object used when returning Package Archive objects.
+    /// </summary>
     [DataContract]
     public class PackageArchiveSummaryData
     {
         #region Public Constructors

+        /// <summary>
+        ///     Initializes a new instance of the <see cref="PackageArchiveSummaryData"/> class with the specified <paramref name="packageArchive"/>.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> instance from which to copy values.</param>
         public PackageArchiveSummaryData(IPackageArchive packageArchive)
         {
             this.CopyPropertyValuesFrom(packageArchive);
@@ -23,49 +71,49 @@
         #region Public Properties

         /// <summary>
-        ///     Gets the time at which the archive was created, in Utc.
+        ///     Gets or sets the time at which the Archive was created, in Utc.
         /// </summary>
         [JsonProperty(Order = 5)]
         [DataMember(Order = 5)]
         public DateTime CreatedOn { get; set; }

         /// <summary>
-        ///     Gets the fully qualified filename of the archive file.
+        ///     Gets or sets the fully qualified filename of the Archive file.
         /// </summary>
         [JsonProperty(Order = 2)]
         [DataMember(Order = 2)]
         public string FileName { get; set; }

         /// <summary>
-        ///     Gets the Fully Qualified Name of the Package.
+        ///     Gets or sets the fully fualified fame of the Package.
         /// </summary>
         [JsonProperty(Order = 1)]
         [DataMember(Order = 1)]
         public string FQN { get; set; }

         /// <summary>
-        ///     Gets a value indicating whether the archive signature contains a trust.
+        ///     Gets or sets a value indicating whether the Archive signature contains a trust.
         /// </summary>
         [JsonProperty(Order = 3)]
         [DataMember(Order = 3)]
         public bool HasTrust { get; set; }

         /// <summary>
-        ///     Gets a value indicating whether the archive is signed.
+        ///     Gets or sets a value indicating whether the Archive is signed.
         /// </summary>
         [JsonProperty(Order = 4)]
         [DataMember(Order = 4)]
         public bool IsSigned { get; set; }

         /// <summary>
-        ///     Gets the <see cref="IPackageManifest"/> for the Package.
+        ///     Gets or sets the Manifest for the Package.
         /// </summary>
         [JsonProperty(Order = 7)]
         [DataMember(Order = 7)]
         public PackageManifestData Manifest { get; set; }

         /// <summary>
-        ///     Gets the time at which the archive was last modified, in Utc.
+        ///     Gets or sets the time at which the Archive was last modified, in Utc.
         /// </summary>
         [JsonProperty(Order = 6)]
         [DataMember(Order = 6)]


Added delay for llSetPrimitiveParams() and llSetLinkPrimitiveParams() functions per the LSL wiki.

Signed-off-by: Melanie <melanie@t-data.com>

This patch also fixes a large amount of trailing whitespace. While this is
beneficial, it should really be in a separate patch that fixes whitespace only.
Just good practice.

--- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -24,7 +24,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-
+
 using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -252,9 +252,9 @@
             case ScriptBaseClass.LINK_ALL_OTHERS:
                 if (m_host.ParentGroup ==  null)
                     return new List<SceneObjectPart>();
-
+
                 ret = new List<SceneObjectPart>(m_host.ParentGroup.Parts);
-
+
                 if (ret.Contains(m_host))
                     ret.Remove(m_host);
                 return ret;
@@ -262,9 +262,9 @@
             case ScriptBaseClass.LINK_ALL_CHILDREN:
                 if (m_host.ParentGroup ==  null)
                     return new List<SceneObjectPart>();
-
+
                 ret = new List<SceneObjectPart>(m_host.ParentGroup.Parts);
-
+
                 if (ret.Contains(m_host.ParentGroup.RootPart))
                     ret.Remove(m_host.ParentGroup.RootPart);
                 return ret;
@@ -1404,7 +1404,7 @@

             if (face == ScriptBaseClass.ALL_SIDES)
                 face = SceneObjectPart.ALL_SIDES;
-
+
             m_host.SetFaceColor(new Vector3((float)color.x, (float)color.y, (float)color.z), face);
         }

@@ -2039,7 +2039,7 @@

 //KF:  Do NOT use this next line if using ODE physics engine. This need a switch based on .ini Phys Engine type
 //          part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
-
+
             // So, after thinking about this for a bit, the issue with the part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition line
             // is it isn't compatible with vehicles because it causes the vehicle body to have to be broken down and rebuilt
             // It's perfectly okay when the object is not an active physical body though.
@@ -4009,7 +4009,7 @@
             case 1: // DATA_ONLINE (0|1)
                 if (pinfo != null && pinfo.RegionID != UUID.Zero)
                     reply = "1";
-                else
+                else
                     reply = "0";
                 break;
             case 2: // DATA_NAME (First Last)
@@ -4202,7 +4202,7 @@
                         return currentAnimationState;
                 }
             }
-
+
             return String.Empty;
         }

@@ -4317,7 +4317,7 @@
                         return;

                     // Need provisions for Group Owned here
-                    if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
+                    if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
                         targetlandObj.LandData.IsGroupOwned || m_host.OwnerID == targetID)
                     {
                         pushAllowed = true;
@@ -4337,8 +4337,8 @@
                         if ((targetlandObj.LandData.Flags & (uint)ParcelFlags.RestrictPushObject) == (uint)ParcelFlags.RestrictPushObject)
                         {
                             // Need provisions for Group Owned here
-                            if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
-                                targetlandObj.LandData.IsGroupOwned ||
+                            if (m_host.OwnerID == targetlandObj.LandData.OwnerID ||
+                                targetlandObj.LandData.IsGroupOwned ||
                                 m_host.OwnerID == targetID)
                             {
                                 pushAllowed = true;
@@ -4463,7 +4463,7 @@

             return sides;
         }
-
+

         /* The new / changed functions were tested with the following LSL script:

@@ -5470,7 +5470,7 @@
                  flags |= ScriptBaseClass.AGENT_SITTING;
              }

-             if (agent.Animator.Animations.DefaultAnimation.AnimID
+             if (agent.Animator.Animations.DefaultAnimation.AnimID
                 == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
              {
                  flags |= ScriptBaseClass.AGENT_SITTING;
@@ -5837,7 +5837,7 @@
             m_host.AddScriptLPS(1);
             return World.SimulatorFPS;
         }
-
+

         /* particle system rules should be coming into this routine as doubles, that is
         rule[0] should be an integer from this list and rule[1] should be the arg
@@ -5920,7 +5920,7 @@

         private void SetParticleSystem(SceneObjectPart part, LSL_List rules) {

-
+
             if (rules.Length == 0)
             {
                 part.RemoveParticleSystem();
@@ -6091,7 +6091,7 @@
             if (m_host.PhysActor != null)
             {
                 float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0));
-                float waterLevel = (float)llWater(new LSL_Types.Vector3(0, 0, 0));
+                float waterLevel = (float)llWater(new LSL_Types.Vector3(0, 0, 0));
                 PIDHoverType hoverType = PIDHoverType.Ground;
                 if (water != 0)
                 {
@@ -6105,7 +6105,7 @@
                 {
                     height += ground;
                 }
-
+
                 m_host.SetHoverHeight((float)height, hoverType, (float)tau);
             }
         }
@@ -6487,19 +6487,19 @@
                 if (xmlRpcRouter != null)
                 {
                     string ExternalHostName = m_ScriptEngine.World.RegionInfo.ExternalHostName;
-
-                    xmlRpcRouter.RegisterNewReceiver(m_ScriptEngine.ScriptModule, channelID, m_host.UUID,
-                                                     m_itemID, String.Format("http://{0}:{1}/", ExternalHostName,
+
+                    xmlRpcRouter.RegisterNewReceiver(m_ScriptEngine.ScriptModule, channelID, m_host.UUID,
+                                                     m_itemID, String.Format("http://{0}:{1}/", ExternalHostName,
                                                                              xmlrpcMod.Port.ToString()));
                 }
-                object[] resobj = new object[]
-                    {
-                        new LSL_Integer(1),
-                        new LSL_String(channelID.ToString()),
-                        new LSL_String(UUID.Zero.ToString()),
-                        new LSL_String(String.Empty),
-                        new LSL_Integer(0),
-                        new LSL_String(String.Empty)
+                object[] resobj = new object[]
+                    {
+                        new LSL_Integer(1),
+                        new LSL_String(channelID.ToString()),
+                        new LSL_String(UUID.Zero.ToString()),
+                        new LSL_String(String.Empty),
+                        new LSL_Integer(0),
+                        new LSL_String(String.Empty)
                     };
                 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams("remote_data", resobj,
                                                                          new DetectParams[0]));
@@ -6874,6 +6874,8 @@
         {
             m_host.AddScriptLPS(1);
             SetPrimParams(m_host, rules);
+
+            ScriptSleep(200);
         }

         public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules)
@@ -6884,6 +6886,8 @@

             foreach (SceneObjectPart part in parts)
                 SetPrimParams(part, rules);
+
+            ScriptSleep(200);
         }

         public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules)
@@ -7041,7 +7045,7 @@
                                 radiusoffset = (float)rules.GetLSLFloatItem(idx++);
                                 skew = (float)rules.GetLSLFloatItem(idx++);
                                 part.Shape.PathCurve = (byte)Extrusion.Curve1;
-                                SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
+                                SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
                                                         revolutions, radiusoffset, skew, 0);
                                 break;

@@ -7061,7 +7065,7 @@
                                 radiusoffset = (float)rules.GetLSLFloatItem(idx++);
                                 skew = (float)rules.GetLSLFloatItem(idx++);
                                 part.Shape.PathCurve = (byte)Extrusion.Curve1;
-                                SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
+                                SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
                                                         revolutions, radiusoffset, skew, 1);
                                 break;

@@ -7081,7 +7085,7 @@
                                 radiusoffset = (float)rules.GetLSLFloatItem(idx++);
                                 skew = (float)rules.GetLSLFloatItem(idx++);
                                 part.Shape.PathCurve = (byte)Extrusion.Curve1;
-                                SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
+                                SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b,
                                                         revolutions, radiusoffset, skew, 3);
                                 break;

@@ -7127,7 +7131,7 @@
                         SetAlpha(part, alpha, face);

                         break;
-
+
                     case (int)ScriptBaseClass.PRIM_FLEXIBLE:
                         if (remain < 7)
                             return;
@@ -7143,7 +7147,7 @@
                         SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force);

                         break;
-
+
                     case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
                         if (remain < 5)
                             return;
@@ -7156,7 +7160,7 @@
                         SetPointLight(part, light, lightcolor, intensity, radius, falloff);

                         break;
-
+
                     case (int)ScriptBaseClass.PRIM_GLOW:
                         if (remain < 2)
                             return;
@@ -7166,7 +7170,7 @@
                         SetGlow(part, face, glow);

                         break;
-
+
                     case (int)ScriptBaseClass.PRIM_BUMP_SHINY:
                         if (remain < 3)
                             return;
@@ -7177,7 +7181,7 @@
                         SetShiny(part, face, shiny, bump);

                         break;
-
+
                      case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
                          if (remain < 2)
                              return;
@@ -7185,7 +7189,7 @@
                          bool st = rules.GetLSLIntegerItem(idx++);
                          SetFullBright(part, face , st);
                          break;
-
+
                      case (int)ScriptBaseClass.PRIM_MATERIAL:
                          if (remain < 1)
                              return;
@@ -7195,7 +7199,7 @@

                          part.Material = Convert.ToByte(mat);
                          break;
-
+
                      case (int)ScriptBaseClass.PRIM_PHANTOM:
                         if (remain < 1)
                              return;
@@ -7210,7 +7214,7 @@

                          part.ScriptSetPhantomStatus(phantom);
                          break;
-
+
                      case (int)ScriptBaseClass.PRIM_PHYSICS:
                         if (remain < 1)
                              return;
@@ -7224,7 +7228,7 @@

                          part.ScriptSetPhysicsStatus(physics);
                          break;
-
+
                     case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
                         if (remain < 1)
                             return;
@@ -7350,7 +7354,7 @@
         public LSL_Vector llGetRootPosition()
         {
             m_host.AddScriptLPS(1);
-            return new LSL_Vector(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y,
+            return new LSL_Vector(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y,
                                   m_host.ParentGroup.AbsolutePosition.Z);
         }

@@ -7444,7 +7448,7 @@
                 {
                     LSL_Vector lower;
                     LSL_Vector upper;
-                    if (presence.Animator.Animations.DefaultAnimation.AnimID
+                    if (presence.Animator.Animations.DefaultAnimation.AnimID
                         == AnimationSet.Animations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
                     {
                         // This is for ground sitting avatars
@@ -7643,8 +7647,8 @@
                                 res.Add(new LSL_Float((Shape.PathRevolutions * 0.015) + 1.0)); // Slightly inaccurate, because an unsigned
                                                                                // byte is being used to represent the entire
                                                                                // range of floating-point values from 1.0
-                                                                                // through 4.0 (which is how SL does it).
-
+                                                                                // through 4.0 (which is how SL does it).
+
                                 // float radiusoffset
                                 res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0));

@@ -7819,104 +7823,104 @@
             // Assuming silently fail means give back an empty list.  Ideally, need to check this.
             if (face < 0 || face > m_host.GetNumberOfSides() - 1)
                 return new LSL_List();
-
+
             return GetPrimMediaParams(face, rules);
         }
-
+
         private LSL_List GetPrimMediaParams(int face, LSL_List rules)
         {
             IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
             if (null == module)
                 throw new Exception("Media on a prim functions not available");
-
+
             MediaEntry me = module.GetMediaEntry(m_host, face);
-
+
             // As per http://wiki.secondlife.com/wiki/LlGetPrimMediaParams
             if (null == me)
                 return new LSL_List();
-
+
             LSL_List res = new LSL_List();

             for (int i = 0; i < rules.Length; i++)
             {
                 int code = (int)rules.GetLSLIntegerItem(i);
-
+
                 switch (code)
                 {
                     case ScriptBaseClass.PRIM_MEDIA_ALT_IMAGE_ENABLE:
                         // Not implemented
                         res.Add(new LSL_Integer(0));
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_CONTROLS:
                         if (me.Controls == MediaControls.Standard)
                             res.Add(new LSL_Integer(ScriptBaseClass.PRIM_MEDIA_CONTROLS_STANDARD));
                         else
                             res.Add(new LSL_Integer(ScriptBaseClass.PRIM_MEDIA_CONTROLS_MINI));
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_CURRENT_URL:
                         res.Add(new LSL_String(me.CurrentURL));
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_HOME_URL:
                         res.Add(new LSL_String(me.HomeURL));
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_AUTO_LOOP:
                         res.Add(me.AutoLoop ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_AUTO_PLAY:
                         res.Add(me.AutoPlay ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_AUTO_SCALE:
                         res.Add(me.AutoScale ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_AUTO_ZOOM:
                         res.Add(me.AutoZoom ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_FIRST_CLICK_INTERACT:
                         res.Add(me.InteractOnFirstClick ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_WIDTH_PIXELS:
                         res.Add(new LSL_Integer(me.Width));
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_HEIGHT_PIXELS:
                         res.Add(new LSL_Integer(me.Height));
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_WHITELIST_ENABLE:
                         res.Add(me.EnableWhiteList ? ScriptBaseClass.TRUE : ScriptBaseClass.FALSE);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_WHITELIST:
                         string[] urls = (string[])me.WhiteList.Clone();
-
+
                         for (int j = 0; j < urls.Length; j++)
                             urls[j] = Uri.EscapeDataString(urls[j]);
-
+
                         res.Add(new LSL_String(string.Join(", ", urls)));
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_PERMS_INTERACT:
                         res.Add(new LSL_Integer((int)me.InteractPermissions));
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
                         res.Add(new LSL_Integer((int)me.ControlPermissions));
                         break;
                 }
             }
-
+
             return res;
         }
-
+
         public LSL_Integer llSetPrimMediaParams(int face, LSL_List rules)
         {
             m_host.AddScriptLPS(1);
@@ -7927,32 +7931,32 @@
             // Don't perform the media check directly
             if (face < 0 || face > m_host.GetNumberOfSides() - 1)
                 return ScriptBaseClass.LSL_STATUS_OK;
-
+
             return SetPrimMediaParams(face, rules);
         }
-
+
         private LSL_Integer SetPrimMediaParams(int face, LSL_List rules)
         {
             IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
             if (null == module)
                 throw new Exception("Media on a prim functions not available");
-
+
             MediaEntry me = module.GetMediaEntry(m_host, face);
             if (null == me)
                 me = new MediaEntry();
-
+
             int i = 0;
-
+
             while (i < rules.Length - 1)
             {
                 int code = rules.GetLSLIntegerItem(i++);
-
+
                 switch (code)
                 {
                     case ScriptBaseClass.PRIM_MEDIA_ALT_IMAGE_ENABLE:
                         me.EnableAlterntiveImage = (rules.GetLSLIntegerItem(i++) != 0 ? true : false);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_CONTROLS:
                         int v = rules.GetLSLIntegerItem(i++);
                         if (ScriptBaseClass.PRIM_MEDIA_CONTROLS_STANDARD == v)
@@ -7960,47 +7964,47 @@
                         else
                             me.Controls = MediaControls.Mini;
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_CURRENT_URL:
                         me.CurrentURL = rules.GetLSLStringItem(i++);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_HOME_URL:
                         me.HomeURL = rules.GetLSLStringItem(i++);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_AUTO_LOOP:
                         me.AutoLoop = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_AUTO_PLAY:
                         me.AutoPlay = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_AUTO_SCALE:
                         me.AutoScale = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_AUTO_ZOOM:
                         me.AutoZoom = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_FIRST_CLICK_INTERACT:
                         me.InteractOnFirstClick = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_WIDTH_PIXELS:
                         me.Width = (int)rules.GetLSLIntegerItem(i++);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_HEIGHT_PIXELS:
                         me.Height = (int)rules.GetLSLIntegerItem(i++);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_WHITELIST_ENABLE:
                         me.EnableWhiteList = (ScriptBaseClass.TRUE == rules.GetLSLIntegerItem(i++) ? true : false);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_WHITELIST:
                         string[] rawWhiteListUrls = rules.GetLSLStringItem(i++).ToString().Split(new char[] { ',' });
                         List<string> whiteListUrls = new List<string>();
@@ -8008,22 +8012,22 @@
                             rawWhiteListUrls, delegate(string rawUrl) { whiteListUrls.Add(rawUrl.Trim()); });
                         me.WhiteList = whiteListUrls.ToArray();
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_PERMS_INTERACT:
                         me.InteractPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
                         break;
-
+
                     case ScriptBaseClass.PRIM_MEDIA_PERMS_CONTROL:
                         me.ControlPermissions = (MediaPermission)(byte)(int)rules.GetLSLIntegerItem(i++);
                         break;
                 }
             }
-
+
             module.SetMediaEntry(m_host, face, me);
-
+
             return ScriptBaseClass.LSL_STATUS_OK;
         }
-
+
         public LSL_Integer llClearPrimMedia(LSL_Integer face)
         {
             m_host.AddScriptLPS(1);
@@ -8034,16 +8038,16 @@
             // FIXME: Don't perform the media check directly
             if (face < 0 || face > m_host.GetNumberOfSides() - 1)
                 return ScriptBaseClass.LSL_STATUS_OK;
-
+
             IMoapModule module = m_ScriptEngine.World.RequestModuleInterface<IMoapModule>();
             if (null == module)
                 throw new Exception("Media on a prim functions not available");
-
+
             module.ClearMediaEntry(m_host, face);
-
+
             return ScriptBaseClass.LSL_STATUS_OK;
         }
-
+
         //  <remarks>
         //  <para>
         //  The .NET definition of base 64 is:
@@ -8303,7 +8307,7 @@
         public LSL_String llGetHTTPHeader(LSL_Key request_id, string header)
         {
             m_host.AddScriptLPS(1);
-
+
            if (m_UrlModule != null)
                return m_UrlModule.GetHttpHeader(new UUID(request_id), header);
            return String.Empty;
@@ -8492,19 +8496,19 @@

             return tokens;
         }
-
+
         public LSL_List llParseString2List(string src, LSL_List separators, LSL_List spacers)
         {
             m_host.AddScriptLPS(1);
             return this.ParseString(src, separators, spacers, false);
         }
-
+
         public LSL_List llParseStringKeepNulls(string src, LSL_List separators, LSL_List spacers)
         {
             m_host.AddScriptLPS(1);
             return this.ParseString(src, separators, spacers, true);
         }
-
+
         public LSL_Integer llGetObjectPermMask(int mask)
         {
             m_host.AddScriptLPS(1);


Today fixed

Today fixed

--- RosaroterPanterWPF/RosaroterPanterWPF/AppServices/DataService.cs
+++ RosaroterPanterWPF/RosaroterPanterWPF/AppServices/DataService.cs
@@ -90,7 +90,11 @@
                 }

                 // today was not found. Create a new day object.
-                return new Day(time, null, string.Empty);
+                Day ret = new Day(time, null, string.Empty);
+
+                _days.Add(ret);
+
+                return ret;
             }
         }


remove field owner of request

remove field owner of request

--- Server/WebSockets/StringWebSockets/StringWebSocketsOperations.cs
+++ Server/WebSockets/StringWebSockets/StringWebSocketsOperations.cs
@@ -28,11 +28,6 @@
                 string msg = await _stringWebSocket.ReceiveAsync();

                 JObject info = JObject.Parse(msg);
-
-                if(!(info.TryGetValue("owner", StringComparison.OrdinalIgnoreCase, out JToken infoOwner) && infoOwner.Type == JTokenType.Integer)) {
-
-                    continue;//TODO REVER
-                }

                 if(!(info.TryGetValue("type", StringComparison.OrdinalIgnoreCase, out JToken infoType) && infoType.Type == JTokenType.String)) {


Fixing test expectations

Fixing test expectations

--- ServerComponent/WebClientAutomatorTest/WebApiSchemaReaderTest.cs
+++ ServerComponent/WebClientAutomatorTest/WebApiSchemaReaderTest.cs
@@ -27,7 +27,7 @@
       var webApiSchema = _webApiSchemaReader.GetWebApiSchema(_webApiAssembly);

       webApiSchema.Should().NotBeNull();
-      webApiSchema.Controllers.Count.Should().Be(2);
+      webApiSchema.Controllers.Count.Should().Be(4);
     }

     [Test]


more connect tests

more connect tests

--- test/Novell.Directory.Ldap.NETStandard.FunctionalTests/ConnectTests.cs
+++ test/Novell.Directory.Ldap.NETStandard.FunctionalTests/ConnectTests.cs
@@ -8,12 +8,38 @@
     public class ConnectTests
     {
         [Fact]
-        public async Task Connect_Works()
+        public async Task Connect_when_correct_credentials_is_successful()
         {
             await TestHelper.WithLdapConnectionAsync(
                 async ldapConnection =>
                 {
                     await ldapConnection.BindAsync(TestsConfig.LdapServer.RootUserDn, TestsConfig.LdapServer.RootUserPassword);
+                });
+        }
+
+        [Fact]
+        public async Task Connect_when_empty_dn_throws_exception()
+        {
+            await TestHelper.WithLdapConnectionAsync(
+                async ldapConnection =>
+                {
+                    await Assert.ThrowsAsync<LdapException>(
+                        async () => await ldapConnection.BindAsync(
+                            string.Empty,
+                            TestsConfig.LdapServer.RootUserPassword));
+                });
+        }
+
+        [Fact]
+        public async Task Connect_when_wrong_password_throws_exception()
+        {
+            await TestHelper.WithLdapConnectionAsync(
+                async ldapConnection =>
+                {
+                    await Assert.ThrowsAsync<LdapException>(
+                        async () => await ldapConnection.BindAsync(
+                            TestsConfig.LdapServer.RootUserDn,
+                            TestsConfig.LdapServer.RootUserPassword + "1"));
                 });
         }

@@ -58,7 +84,7 @@
                 }, false, true);
         }

-        [Fact(Skip = "This randomly fails")]
+        [Fact]
         public async Task Connect_WithBindAfterStartTlsAndRestoreNonTls_Works()
         {
             await TestHelper.WithLdapConnectionAsync(


Improved script, export / load operations and feedback

--- Source/Applications/openMIC/openMIC/wwwroot/DranetzConfig.cshtml
+++ Source/Applications/openMIC/openMIC/wwwroot/DranetzConfig.cshtml
@@ -323,7 +323,7 @@
             <button type="button" class="btn btn-sm btn-default pull-right" id="exportConfigButton" data-bind="enable: canExport" onclick="showExportConfigFileNameDialog()">
                   Export Config
             </button>
-

+

                 <form class="form-inline" role="form">

                         <button type="button" class="close" onclick="$('#exportConfigFileNameDialog').hide()" style="margin-top: -5px; margin-left: 8px">×</button>
@@ -460,6 +460,24 @@
                 owner: self
             });

+            self.selectedAnalyzer = ko.pureComputed({
+                read: function () {
+                    let selectedAnalyzer = undefined;
+
+                    self.analyzers().every(function (analyzer) {
+                        if (analyzer.isSelected()) {
+                            selectedAnalyzer = analyzer;
+                            return false; // break
+                        }
+
+                        return true;
+                    });
+
+                    return selectedAnalyzer;
+                },
+                owner: self
+            });
+
             self.canSave = ko.pureComputed({
                 read: function () {
                     return @(userIsEditor.ToString().ToLower()) &&
@@ -514,57 +532,104 @@

             // Methods

+            self.queryModules = function () {
+                if (!self.dataHubIsConnected())
+                    return $.Deferred().resolve().promise();
+
+                $("[id=moduleRow]").css("visibility", "hidden");
+                $("[id=analyzerRow]").css("visibility", "hidden");
+                self.modules.removeAll();
+
+                return dataHub.getInstanceStatus(deviceID).done(function (statusResult) {
+                    const status = JSON.parse(statusResult);
+
+                    self.serialNumber(status.commandresult.characteristics["@@serial_number"]);
+                    self.systemHealth(status.commandresult.characteristics["@@system_health"]);
+                    self.databaseHealth(status.commandresult.characteristics["@@database_health"]);
+                    self.hostFirmware(status.commandresult.characteristics["@@cs_firmware_version"]);
+                    self.commFirmware(status.commandresult.characteristics["@@host_firmware_version"]);
+                    self.gpsInstalled(parseInt(status.commandresult.gps_status["@@installed"], 10) !== 0);
+                    self.gpsSatellites(status.commandresult.gps_status["@@gps_satellites"]);
+
+                    var observableModules = [];
+
+                    status.commandresult.inputs.list.item.forEach(function (module) {
+                        const observableModule = ko.mapping.fromJS(module);
+                        observableModules.push(observableModule);
+                    });
+
+                    self.modules(observableModules);
+
+                    const observableAnalyzers = [];
+
+                    status.commandresult.analyzers.list.item.forEach(function (analyzer) {
+                        const observerableAnalyzer = ko.mapping.fromJS(analyzer);
+
+                        observerableAnalyzer.configID = ko.pureComputed({
+                            read: () => parseInt(observerableAnalyzer["@@id"](), 10)
+                        });
+
+                        observerableAnalyzer.analyzerType = ko.pureComputed({
+                            read: () => parseInt(observerableAnalyzer["@@analyzer_type"](), 10)
+                        });
+
+                        observerableAnalyzer.analyzerTypeName = ko.pureComputed({
+                            read: () => `[${observerableAnalyzer.analyzerType()}]: ${analyzerTypes[analyzerTypeKeys[observerableAnalyzer.analyzerType()]].name}`
+                        });
+
+                        observerableAnalyzer.isSelected = ko.pureComputed({
+                            read: () => observerableAnalyzer.configID() === viewModel.currentConfigID()
+                        });
+
+                        observerableAnalyzer.montitoringStatus = ko.pureComputed({
+                            read: () => parseInt(observerableAnalyzer["@@monitoring_on"](), 10) > 0 ? "On" : "Off"
+                        });
+
+                        observableAnalyzers.push(observerableAnalyzer);
+                    });
+
+                    self.analyzers(observableAnalyzers);
+
+                    return dataHub.getInstanceConfig(deviceID).then(function (configResult) {
+                        const config = JSON.parse(configResult);
+
+                        self.versionInfo(config.commandresult.characteristics.psz_version_string["@@value"]);
+                        self.ipAddress(config.commandresult.communications.tcp_ip["@@ip_address"]);
+                        self.siteName(config.commandresult.characteristics.psz_sitename["@@value"]);
+
+                        // Make sure table is refreshed
+                        if (ko.options.deferUpdates)
+                            ko.tasks.runEarly();
+
+                        self.isDirty(false);
+
+                        $("[id=moduleRow]").css("visibility", "visible");
+                        $("[id=analyzerRow]").css("visibility", "visible");
+                    });
+                })
+                .fail(function (error) {
+                    showErrorMessage(error, null, true);
+                });
+            }
+
             self.configChanged = function () {
                 self.currentAnalyzerConfig.valueHasMutated();
                 self.isDirty(true);
             }

-            self.createSectionTabs = function (firstCall) {
-                const activeSections = sections[self.currentAnalyzerType()];
-                const tabList = [];
-                const tabSections = [];
-
-                tabList.push(`<ul>`);
-
-                for (let key in activeSections) {
-                    if (activeSections.hasOwnProperty(key)) {
-                        const section = activeSections[key];
-                        const name = section.name;
-                        const index = section.index;
-
-                        tabList.push(`<li><a href="#tab${key}">${name}</a></li>`);
-
-                        tabSections.push(`<div id="tab${key}" ${index === 0 ? "class=\"ui-tabs-active\"" : "style=\"display: none\""}>`);
-                        tabSections.push(`    <table width="75%" class="table-center">`);
-                        tabSections.push(`        <tr>`);
-                        tabSections.push(`            <th class="header"><div class="header">${name}</div></th>`);
-                        tabSections.push(`        </tr>`);
-                        tabSections.push(`    </table>`);
-                        tabSections.push(`</div>`);
-                    }
-                }
-
-                tabList.push(`</ul>`);
-
-                if (!firstCall)
-                    $("#tabs").tabs("destroy");
-
-                $("#tabs").html(tabList.join("\r\n") + tabSections.join("\r\n"));
-
-                $("#tabs").tabs({
-                    active: 0
-                    // Uncomment to enable intra-tab save promt
-                    //activate: function(event, ui) {
-                    //    if (self.isDirty() && confirm("Do you want to keep the changes?"))
-                    //        self.saveSection();
-                    //}
+            self.loadAnalyzerConfig = function (configID, analyzerType) {
+                return dataHub.getAnalyzerConfig(deviceID, configID).then(function (configResult) {
+                    return self._loadAnalyzerConfig(configID, analyzerType, JSON.parse(configResult));
+                })
+                .fail(function (error) {
+                    showErrorMessage(`Load Analyzer Config "${error}"`, null, true);
                 });
             }

-            self.saveSection = function () {
+            self.saveAnalyzerConfig = function () {
                 if (!self.canSave()) {
-                    showErrorMessage("Cannot save record at this time.");
-                    return;
+                    showErrorMessage("Cannot save data at this time.");
+                    return $.Deferred().resolve().promise();
                 }

                 showInfoMessage("Saving configuration, please wait...  ", -1, true);
@@ -573,7 +638,7 @@

                 const configID = self.currentConfigID();

-                dataHub.beginTransaction(deviceID).then(function () {
+                return dataHub.beginTransaction(deviceID).then(function () {
                     return dataHub.setAnalyzerConfig(deviceID, configID, JSON.stringify(self.currentAnalyzerConfig())).done(function () {
                         self.isDirty(false);
                         showInfoMessage("Save complete.", 5000);
@@ -600,24 +665,6 @@
                 });
             }

-            self.addSection = function (sectionKey, inputs) {
-                const [ sectionHtml, sectionScript ] = inputs;
-
-                $(`#tab${sectionKey}`).html(sectionHtml);
-
-                if (sectionScript.length > 0) {
-                    const scriptID = `${sectionKey}SectionMappings`;
-
-                    if ($(`#${scriptID}`).length)
-                        return;
-
-                    const scriptElem = document.createElement("script");
-                    scriptElem.id = scriptID;
-                    scriptElem.innerHTML = sectionScript;
-                    document.body.appendChild(scriptElem);
-                }
-            }
-
             self.importAnalyzerConfig = function (fileData) {
                 const reader = new FileReader();

@@ -633,12 +680,12 @@
                     const analyzerType = parseInt(config.commandresult.characteristics.anyalyzer.analyzer_type["@@value"], 10);

                     self._loadAnalyzerConfig(configID, analyzerType, config).done(function () {
-                        self.analyzers().forEach(function (analyzer) {
-                            if (analyzer.isSelected()) {
-                                analyzer["@@name"](config.commandresult["@@name"]);
-                                analyzer["@@analyzer_type"](analyzerType.toString());
-                            }
-                        });
+                        const selectedAnalyzer = self.selectedAnalyzer();
+
+                        if (selectedAnalyzer) {
+                            selectedAnalyzer["@@name"](config.commandresult.characteristics.anyalyzer.tag["@@value"]);
+                            selectedAnalyzer["@@analyzer_type"](analyzerType.toString());
+                        }

                         self.isDirty(true);
                     });
@@ -668,13 +715,68 @@
                 }
             };

-            self.loadAnalyzerConfig = function (configID, analyzerType) {
-                return dataHub.getAnalyzerConfig(deviceID, configID).then(function (configResult) {
-                    return self._loadAnalyzerConfig(configID, analyzerType, JSON.parse(configResult));
-                })
-                .fail(function (error) {
-                    showErrorMessage(`Load Analyzer Config "${error}"`, null, true);
+            self.createSectionTabs = function (firstCall) {
+                const activeSections = sections[self.currentAnalyzerType()];
+                const tabList = [];
+                const tabSections = [];
+
+                tabList.push(`<ul>`);
+
+                for (let key in activeSections) {
+                    if (activeSections.hasOwnProperty(key)) {
+                        const section = activeSections[key];
+                        const name = section.name;
+                        const index = section.index;
+
+                        tabList.push(`<li><a href="#tab${key}">${name}</a></li>`);
+
+                        tabSections.push(`<div id="tab${key}" ${index === 0 ? "class=\"ui-tabs-active\"" : "style=\"display: none\""}>`);
+                        tabSections.push(`    <table width="75%" class="table-center">`);
+                        tabSections.push(`        <tr>`);
+                        tabSections.push(`            <th class="header"><div class="header">${name}</div></th>`);
+                        tabSections.push(`        </tr>`);
+                        tabSections.push(`    </table>`);
+
+                        if (index === 0)
+                            tabSections.push(`<div id="stubTabSections"></div>`);
+
+                        tabSections.push(`</div>`);
+                    }
+                }
+
+                tabList.push(`</ul>`);
+
+                if (!firstCall)
+                    $("#tabs").tabs("destroy");
+
+                $("#tabs").html(tabList.join("\r\n") + tabSections.join("\r\n"));
+
+                $("#tabs").tabs({
+                    active: 0
+                    // Uncomment to enable intra-tab save prompt like
+                    //activate: function(event, ui) {
+                    //    if (self.canSave() && confirm("Do you want to keep the changes?"))
+                    //        self.saveAnalyzerConfig();
+                    //}
                 });
+            }
+
+            self._loadTabSection = function (sectionKey, inputs) {
+                const [ sectionHtml, sectionScript ] = inputs;
+
+                $(`#tab${sectionKey}`).html(sectionHtml);
+
+                if (sectionScript.length > 0) {
+                    const scriptID = `${sectionKey}SectionMappings`;
+
+                    if ($(`#${scriptID}`).length)
+                        return;
+
+                    const scriptElem = document.createElement("script");
+                    scriptElem.id = scriptID;
+                    scriptElem.innerHTML = sectionScript;
+                    document.body.appendChild(scriptElem);
+                }
             }

             self._loadAnalyzerConfig = function (configID, analyzerType, analyzerConfig) {
@@ -684,10 +786,12 @@
                 }

                 self.isDirty(false);
-                self.currentConfigID(configID);
-                self.currentAnalyzerType(analyzerType);
-                self.currentAnalyzerConfig(analyzerConfig);
-                self.createSectionTabs();
+                self.currentConfigID(configID);             // Integer analyzer configuration ID
+                self.currentAnalyzerType(analyzerType);     // Integer analyzer type (see analyzerTypes)
+                self.currentAnalyzerConfig(analyzerConfig); // Dranetz XML config serialized as JSON
+
+                if (!$("#stubTabSections").length)
+                    self.createSectionTabs();

                 if (!self.dataHubIsConnected())
                     return $.Deferred().resolve().promise();
@@ -698,7 +802,7 @@
                 for (let key in activeSections) {
                     if (activeSections.hasOwnProperty(key)) {
                         promises.push(dataHub.getSectionMap(`${key}.xml`).done(function (result) {
-                            self.addSection(key, buildSection(JSON.parse(result).SECTION));
+                            self._loadTabSection(key, buildSection(JSON.parse(result).SECTION));
                         }).fail(function (error) {
                             showErrorMessage(error, null, true);
                         }));
@@ -721,86 +825,6 @@
                         .hover(showToolTip, hideToolTip);
                 });
             }
-
-            self.queryModules = function () {
-                if (!self.dataHubIsConnected())
-                    return $.Deferred().resolve().promise();
-
-                $("[id=moduleRow]").css("visibility", "hidden");
-                $("[id=analyzerRow]").css("visibility", "hidden");
-                self.modules.removeAll();
-
-                return dataHub.getInstanceStatus(deviceID).done(function (statusResult) {
-                    const status = JSON.parse(statusResult);
-
-                    self.serialNumber(status.commandresult.characteristics["@@serial_number"]);
-                    self.systemHealth(status.commandresult.characteristics["@@system_health"]);
-                    self.databaseHealth(status.commandresult.characteristics["@@database_health"]);
-                    self.hostFirmware(status.commandresult.characteristics["@@cs_firmware_version"]);
-                    self.commFirmware(status.commandresult.characteristics["@@host_firmware_version"]);
-                    self.gpsInstalled(parseInt(status.commandresult.gps_status["@@installed"], 10) !== 0);
-                    self.gpsSatellites(status.commandresult.gps_status["@@gps_satellites"]);
-
-                    var observableModules = [];
-
-                    status.commandresult.inputs.list.item.forEach(function (module) {
-                        const observableModule = ko.mapping.fromJS(module);
-                        observableModules.push(observableModule);
-                    });
-
-                    self.modules(observableModules);
-
-                    const observableAnalyzers = [];
-
-                    status.commandresult.analyzers.list.item.forEach(function (analyzer) {
-                        const observerableAnalyzer = ko.mapping.fromJS(analyzer);
-
-                        observerableAnalyzer.configID = ko.pureComputed({
-                            read: () => parseInt(observerableAnalyzer["@@id"](), 10)
-                        });
-
-                        observerableAnalyzer.analyzerType = ko.pureComputed({
-                            read: () => parseInt(observerableAnalyzer["@@analyzer_type"](), 10)
-                        });
-
-                        observerableAnalyzer.analyzerTypeName = ko.pureComputed({
-                            read: () => `[${observerableAnalyzer.analyzerType()}]: ${analyzerTypes[analyzerTypeKeys[observerableAnalyzer.analyzerType()]].name}`
-                        });
-
-                        observerableAnalyzer.isSelected = ko.pureComputed({
-                            read: () => observerableAnalyzer.configID() === viewModel.currentConfigID()
-                        });
-
-                        observerableAnalyzer.montitoringStatus = ko.pureComputed({
-                            read: () => parseInt(observerableAnalyzer["@@monitoring_on"](), 10) > 0 ? "On" : "Off"
-                        });
-
-                        observableAnalyzers.push(observerableAnalyzer);
-                    });
-
-                    self.analyzers(observableAnalyzers);
-
-                    return dataHub.getInstanceConfig(deviceID).then(function (configResult) {
-                        const config = JSON.parse(configResult);
-
-                        self.versionInfo(config.commandresult.characteristics.psz_version_string["@@value"]);
-                        self.ipAddress(config.commandresult.communications.tcp_ip["@@ip_address"]);
-                        self.siteName(config.commandresult.characteristics.psz_sitename["@@value"]);
-
-                        // Make sure table is refreshed
-                        if (ko.options.deferUpdates)
-                            ko.tasks.runEarly();
-
-                        self.isDirty(false);
-
-                        $("[id=moduleRow]").css("visibility", "visible");
-                        $("[id=analyzerRow]").css("visibility", "visible");
-                    });
-                })
-                .fail(function (error) {
-                    showErrorMessage(error, null, true);
-                });
-            }
         }

         function showSavingMessage() {
@@ -823,15 +847,26 @@
         }

         function loadAnalyzerConfig(record) {
+            if (viewModel.canSave() && !confirm("WARNING: Configuration changes to current analyzer are not saved. Are you sure you want to lose current changes and load new analyzer?"))
+                return $.Deferred().resolve().promise();
+
             const configID = parseInt(record["@@id"](), 10);
             const analyzerType = parseInt(record["@@analyzer_type"](), 10);

-            if (viewModel.isDirty() && confirm("Do you want to keep the changes?"))
-                viewModel.saveSection();
-
+            viewModel.currentConfigID(configID);
+
+            showInfoMessage(`Loading \"${viewModel.selectedAnalyzer()["@@name"]()}\" configuration, please wait...  <span class="glyphicon glyphicon-refresh glyphicon-spin"></span>`, -1, true);
+            hideInfoMessage({ closeHeaderPanel: false, closeFloatingPanels: true });
             showLoadingMessage();

-            return viewModel.loadAnalyzerConfig(configID, analyzerType).always(function () {
+            return viewModel.loadAnalyzerConfig(configID, analyzerType).done(function () {
+                showInfoMessage("Load complete.", 5000);
+                hideInfoMessage({ closeHeaderPanel: true, closeFloatingPanels: false });
+                hideLoadingMessage();
+            })
+            .fail(function (error) {
+                hideInfoMessage();
+                showErrorMessage(`Load Configuration ${error}`, null, true);
                 hideLoadingMessage();
             });
         }
@@ -847,7 +882,7 @@
         }

         function showImportConfigFileNameDialog() {
-            if (viewModel.isDirty() && !confirm("Are you sure you want to skip unsaved configuration changes?"))
+            if (viewModel.canSave() && !confirm("WARNING: Configuration changes are not saved. Are you sure you want to lose current changes and import new config?"))
                 return;

             $("#importConfigFileName").trigger("click");
@@ -856,8 +891,16 @@
         function showExportConfigFileNameDialog() {
             $("#exportConfigFileNameDialog").toggle();

-            if ($("#exportConfigFileNameDialog").is(":visible"))
+            if ($("#exportConfigFileNameDialog").is(":visible")) {
+                const selectedAnalyzer = viewModel.selectedAnalyzer();
+
+                if (selectedAnalyzer)
+                    $("#exportConfigFileName").val(`${selectedAnalyzer["@@name"]()}.json`);
+                else
+                    $("#exportConfigFileName").val("");
+
                 $("#exportConfigFileName").focus();
+            }
         }

         function getActiveTabIndex() {
@@ -939,21 +982,25 @@
                     return;

                 // Handle initial page load
-                showInfoMessage("Loading configuration, please wait...  ", -1, true);
+                showInfoMessage("Loading device details, please wait...  ", -1, true);
                 showLoadingMessage();

                 dataHub.queryDeviceByID(deviceID).done(function (device) {
                     $("#editDeviceName").html(`Editing ${device.Acronym} Configuration`);
-                });
-
-                viewModel.queryModules().then(function () {
-                    viewModel.createSectionTabs(true);
-                    return loadAnalyzerConfig(viewModel.analyzers()[viewModel.currentAnalyzerType()]);
-                })
-                .done(function () {
-                    showInfoMessage("Load complete.", 5000);
-                    hideInfoMessage({ closeHeaderPanel: true, closeFloatingPanels: false });
-                    hideLoadingMessage();
+
+                    viewModel.queryModules().done(function () {
+                        // Create initial section tabs
+                        viewModel.createSectionTabs(true);
+
+                        setTimeout(function () {
+                            loadAnalyzerConfig(viewModel.analyzers()[viewModel.currentAnalyzerType()]);
+                        }, 500);
+                    })
+                    .fail(function (error) {
+                        hideInfoMessage();
+                        showErrorMessage(`Load Configuration ${error}`, null, true);
+                        hideLoadingMessage();
+                    });
                 })
                 .fail(function (error) {
                     hideInfoMessage();
@@ -970,8 +1017,19 @@
                 $("#noDeviceDataMessage").show();

             $("#saveChangesButton").click(function (e) {
-                e.preventDefault(); // Stop form submission
-                viewModel.saveSection();
+                e.preventDefault();
+                viewModel.saveAnalyzerConfig();
+            });
+
+            $(window).bind("beforeunload", function () {
+                if (viewModel.isSaving()) {
+                    return "WARNING: Currently attempting to save changes. It is recommended to stay on page until save completes. Are you sure want to exit page?";
+                }
+                else {
+                    return viewModel.canSave() ?
+                        "WARNING: Configuration changes are not saved. Are you sure you want to lose changes and exit page?" :
+                        undefined;
+                }
             });
         });


Synchrophasor: Added inter-adapter initialization waiting for Timestamp test.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS07]$/openpdc/Synchrophasor/Current Version;C46608

--- Source/Libraries/Adapters/DataQualityMonitoring/TimestampTest.cs
+++ Source/Libraries/Adapters/DataQualityMonitoring/TimestampTest.cs
@@ -235,6 +235,7 @@
 using TVA;
 using TVA.Measurements;
 using TVA.Measurements.Routing;
+using System.Threading;

 namespace DataQualityMonitoring
 {
@@ -243,12 +244,11 @@
     /// </summary>
     public class TimestampTest : FacileActionAdapterBase
     {
-
         #region [ Members ]

         // Fields
         private Dictionary<Ticks, LinkedList<IMeasurement>> m_badTimestampMeasurements;
-        private ConcentratorBase m_discardingAdapter;
+        private ActionAdapterBase m_discardingAdapter;
         private int m_totalBadTimestampMeasurements;
         private Ticks m_timeToPurge;
         private Ticks m_warnInterval;
@@ -316,9 +316,9 @@
             // Find the adapter whose name matches the specified concentratorName
             foreach (IAdapter adapter in Parent)
             {
-                ConcentratorBase concentrator = adapter as ConcentratorBase;
-
-                if (concentrator != null && adapter.Name == concentratorName)
+                ActionAdapterBase concentrator = adapter as ActionAdapterBase;
+
+                if (concentrator != null && string.Compare(adapter.Name, concentratorName, true) == 0)
                 {
                     m_discardingAdapter = concentrator;
                     break;
@@ -326,10 +326,22 @@
             }

             if (m_discardingAdapter == null)
-            {
                 throw new ArgumentException(string.Format("Concentrator {0} not found.", concentratorName));
-            }
-
+
+            // Wait for associated adapter to initialize
+            int timeout = m_discardingAdapter.InitializationTimeout;
+            int waitTime = 0;
+
+            while (!m_discardingAdapter.Initialized && waitTime < timeout)
+            {
+                Thread.Sleep(100);
+                waitTime += 100;
+            }
+
+            if (!m_discardingAdapter.Initialized)
+                throw new TimeoutException(string.Format("Timeout waiting for concentrator {0} to initialize.", concentratorName));
+
+            // Attach to adapter's discarding measurements event
             m_discardingAdapter.DiscardingMeasurements += m_discardingAdapter_DiscardingMeasurements;

             m_purgeTimer.Interval = m_timeToPurge.ToMilliseconds();
@@ -395,6 +407,11 @@
                             m_timestampService.ServiceProcessException -= m_timestampService_ServiceProcessException;
                             m_timestampService.Dispose();
                         }
+
+                        if (m_discardingAdapter != null)
+                            m_discardingAdapter.DiscardingMeasurements -= m_discardingAdapter_DiscardingMeasurements;
+
+                        m_discardingAdapter = null;
                     }
                 }
                 finally


openPDC.UI: In the device wizard, fixed request configuration when updating the configuration of existing devices.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS07]$/openpdc/Synchrophasor/Current Version-VS2012;C80681

--- Source/Libraries/openPDC.UI.WPF/ViewModels/InputWizardDevices.cs
+++ Source/Libraries/openPDC.UI.WPF/ViewModels/InputWizardDevices.cs
@@ -1196,7 +1196,8 @@
                 m_requestConfigurationAttachment = attachments.First();
             }

-            s_responseWaitHandle.Set();
+            if (m_requestConfigurationAttachment is IConfigurationFrame)
+                s_responseWaitHandle.Set();
         }

         /// <summary>


Support Enum arguments.

Support Enum arguments.

--- Source/System.Management/Pash/Implementation/CommandProcessor.cs
+++ Source/System.Management/Pash/Implementation/CommandProcessor.cs
@@ -145,6 +145,10 @@
             {
                 SetValue(memberInfo, Command, value.ToString());
             }
+
+            else if (memberType.IsEnum) {
+                  SetValue (memberInfo, Command, Enum.Parse (type, value.ToString(), true));
+            }

             else if (memberType == typeof(PSObject))
             {


changed ordering of post feedbacks

changed ordering of post feedbacks

--- Source/Web/EngineOverflow.Web/Controllers/QuestionsController.cs
+++ Source/Web/EngineOverflow.Web/Controllers/QuestionsController.cs
@@ -53,11 +53,12 @@
             var itemsToSkip = (page - 1) * ItemsPerPage;

             var feedbacks = postFeedbacks
-                .OrderBy(x => x.CreatedOn)
+                .ProjectTo<FeedbackDisplayViewModel>()
+                .OrderByDescending(x => x.VotesCount)
+                .ThenByDescending(x => x.CreatedOn)
                 .ThenBy(x => x.Id)
                 .Skip(itemsToSkip)
                 .Take(ItemsPerPage)
-                .ProjectTo<FeedbackDisplayViewModel>()
                 .ToList();

             var feedbackViewModel = new FeedbackListViewModel


up for z coordinates -- this fixes #ESAGEPSW-736

--- Terradue.Tep/Terradue/Tep/WebServer/Features/Geometry.Service.cs
+++ Terradue.Tep/Terradue/Tep/WebServer/Features/Geometry.Service.cs
@@ -227,7 +227,7 @@
                 foreach (var p in finalgeometry.Coordinates.ToArray()) {
                     p.X = Math.Round(p.X, 2);
                     p.Y = Math.Round(p.Y, 2);
-                    p.Z = Math.Round(p.Z, 2);
+                    if (p is CoordinateZ) p.Z = Math.Round(p.Z, 2);
                 }
                 wkt = finalgeometry.AsText();
             }
@@ -266,7 +266,7 @@
                 foreach (var p in finalgeometry.Coordinates.ToArray()) {
                     p.X = Math.Round(p.X, 2);
                     p.Y = Math.Round(p.Y, 2);
-                    p.Z = Math.Round(p.Z, 2);
+                    if (p is CoordinateZ) p.Z = Math.Round(p.Z, 2);
                 }
                 wkt = finalgeometry.AsText();
             }
@@ -348,7 +348,7 @@
                 foreach (var p in finalgeometry.Coordinates.ToArray()) {
                     p.X = Math.Round(p.X, 2);
                     p.Y = Math.Round(p.Y, 2);
-                    p.Z = Math.Round(p.Z, 2);
+                    if (p is CoordinateZ) p.Z = Math.Round(p.Z, 2);
                 }
                 wkt = finalgeometry.AsText();
             }


ExpressionToOutput: green

ExpressionToOutput: green

--- Template/TemplateTest/TemplateTest.cs
+++ Template/TemplateTest/TemplateTest.cs
@@ -132,6 +132,9 @@

         [Theory]
         [InlineData("", "", "")]
+        [InlineData("text", "expression", "text2")]
+        [InlineData("", "expression", "")]
+        [InlineData("text", "", "text2")]
         public void ExpressionToOutput(
                 string textBeforeCode, string expressionToOutput, string textAfterCode)
         {
@@ -147,6 +150,7 @@
             var echoLanguage = new MockLanguageBuilder()
                     .WithProgramWrapper(ProgramStructure)
                     .WithMethodWrapper(MethodStructure)
+                    .WithPlainTextWrapper(OutputStatementStructure)
                     .WithExpressionOutputWrapper(ExpressionOutputStructure)
                     .OutputSelfCode()
                     .GetObject();


S-51801-BZ_API: refactor BugzillaReaderUpdater

 remove XMLRPCPROXY usage and  and use the new BugzillaAPI

--- VersionOne.ServiceHost.BugzillaServices/BugzillaReaderUpdater.cs
+++ VersionOne.ServiceHost.BugzillaServices/BugzillaReaderUpdater.cs
@@ -1,8 +1,11 @@
+using Newtonsoft.Json.Linq;
+using System;
 using System.Collections.Generic;
 using System.Globalization;
 using System.Linq;
-using VersionOne.Bugzilla.XmlRpcProxy;
+using VersionOne.Bugzilla.BugzillaAPI;
 using VersionOne.ServiceHost.Core.Logging;
+
 using VersionOne.ServiceHost.WorkitemServices;
 using MappingInfo = VersionOne.ServiceHost.Core.Configuration.MappingInfo;

@@ -24,25 +27,46 @@
         public List<Defect> GetBugs()
         {
             var bugzillaClient = bugzillaClientFactory.CreateNew(configuration.Url);
-
-            var ids = bugzillaClient.LoginSearch(configuration.UserName, configuration.Password, true, configuration.OpenIssueFilterId, configuration.IgnoreCert);
-            var defects = new List<Defect>(ids.Count);
-
-            foreach (var id in ids)
-            {
-                var bug = bugzillaClient.GetBug(id);
-            	var product = bugzillaClient.GetProduct(bug.ProductID);
-            	var user = bugzillaClient.GetUser(bug.AssignedToID);
-
-                var projectMapping = ResolveVersionOneProjectMapping(product.Name);
+            //var bugzillaClient = new BugzillaClient(configuration.Url);
+
+            var ids = bugzillaClient.Search(configuration.OpenIssueFilterId);
+
+            //var bugs = bugzillaClient.Search(configuration.OpenIssueFilterId);
+            // var ids = bugzillaClient.LoginSearch(configuration.UserName, configuration.Password, true, configuration.OpenIssueFilterId, configuration.IgnoreCert);
+
+            //creates a list of defects
+            var defects = new List<Defect>(ids.Count());
+
+            //foreach (var id in ids)
+            foreach (JToken id in ids)
+            {
+
+                //get bug id from bug
+                var bug = bugzillaClient.GetBug(id.Value<int>());
+
+                //get product definition from bug
+               // var product = bugzillaClient.GetProduct(bug.ProductID);
+                //get user info from bug
+               // var user = bugzillaClient.GetUser(bug.AssignedToID);
+
+
+                var projectMapping = ResolveVersionOneProjectMapping(bug.Product);
+                //var projectMapping = ResolveVersionOneProjectMapping(product.Name);
+
                 var priorityMapping = ResolveVersionOnePriorityMapping(bug.Priority);

-                var defect = new Defect(bug.Name, bug.Description, projectMapping.Name, user.Login)
+
+
+                //var defect = new Defect(bug.Name, bug.Description, projectMapping.Name, user.Login)
+                //    { ExternalId = bug.ID.ToString(CultureInfo.InvariantCulture),
+                //      ProjectId = projectMapping.Id };
+                var defect = new Defect(bug.Name, bug.Description, bug.Product, bug.AssignedTo)
                     { ExternalId = bug.ID.ToString(CultureInfo.InvariantCulture),
                       ProjectId = projectMapping.Id };

+
                 // If the BugzillaBugUrlTemplate tag of the config file is set, then build a URL to the issue in Bugzilla.
-				if (!string.IsNullOrEmpty(configuration.UrlTemplateToIssue) && !string.IsNullOrEmpty(configuration.UrlTitleToIssue))
+                if (!string.IsNullOrEmpty(configuration.UrlTemplateToIssue) && !string.IsNullOrEmpty(configuration.UrlTitleToIssue))
                 {
 					defect.ExternalLink = new UrlToExternalSystem(configuration.UrlTemplateToIssue.Replace("#key#", bug.ID.ToString()), configuration.UrlTitleToIssue);
 				}
@@ -50,24 +74,27 @@
                 if (priorityMapping != null)
                 {
                     defect.Priority = priorityMapping.Id;
-                }
-
-                logger.Log(string.Format("Product: ({0}) Bug: ({1}) Defect: ({2}) AssignedTo: ({3})", product, bug, defect, user));
+                }
+
+                logger.Log(string.Format("Product: ({0}) Bug: ({1}) Defect: ({2}) AssignedTo: ({3})", bug.Product, bug, defect, bug.AssignedTo));
+                //logger.Log(string.Format("Product: ({0}) Bug: ({1}) Defect: ({2}) AssignedTo: ({3})", product, bug, defect, user));
 				defects.Add(defect);
             }

-            bugzillaClient.Logout();
+            //bugzillaClient.Logout();
 			return defects;
 		}

 		public void OnDefectCreated(WorkitemCreationResult createdResult)
         {
 			var bugId = int.Parse(createdResult.Source.ExternalId);
-			var bugzillaClient = bugzillaClientFactory.CreateNew(configuration.Url);
-
-            bugzillaClient.Login(configuration.UserName, configuration.Password, true, configuration.IgnoreCert);
-
-			if (configuration.OnCreateAccept && !bugzillaClient.AcceptBug(bugId, configuration.OnCreateResolveValue))
+
+            var bugzillaClient = new BugzillaClient(configuration.Url);
+            //var bugzillaClient = bugzillaClientFactory.CreateNew(configuration.Url);
+
+            //bugzillaClient.Login(configuration.UserName, configuration.Password, true, configuration.IgnoreCert);
+
+            if (configuration.OnCreateAccept && !bugzillaClient.AcceptBug(bugId, configuration.OnCreateResolveValue))
             {
 				logger.Log(LogMessage.SeverityType.Error, string.Format("Failed to accept bug {0}.", bugId));
 			}
@@ -94,7 +121,7 @@
 			}

             ResolveBugIfRequired(configuration.OnCreateResolveValue, bugId, bugzillaClient);
-			bugzillaClient.Logout();
+			//bugzillaClient.Logout();
 		}

         private void ResolveBugIfRequired(string resolution, int bugId, IBugzillaClient client)
@@ -106,11 +133,14 @@

             try
             {
-                if(!client.ResolveBug(bugId, resolution, string.Empty))
-                {
+                //if(!client.ResolveBug(bugId, resolution, string.Empty))
+                if (!client.ResolveBug(bugId, resolution))
+                    {
                     logger.Log(LogMessage.SeverityType.Error, string.Format("Failed to resolve bug to {0}.", resolution));
                 }
-            } catch(BugzillaException ex)
+                //} catch(BugzillaException ex)
+            }
+            catch (Exception ex)
             {
                 logger.Log(LogMessage.SeverityType.Error, "Failed to resolve bug: " + ex.InnerException.Message);
             }
@@ -119,10 +149,12 @@
 		public bool OnDefectStateChange(WorkitemStateChangeResult stateChangeResult)
         {
 			logger.Log(LogMessage.SeverityType.Debug, stateChangeResult.ToString());
+
 			var bugId = int.Parse(stateChangeResult.ExternalId);
-			var bugzillaClient = bugzillaClientFactory.CreateNew(configuration.Url);
-
-            bugzillaClient.Login(configuration.UserName, configuration.Password, true, configuration.IgnoreCert);
+
+            var bugzillaClient = bugzillaClientFactory.CreateNew(configuration.Url);
+
+            //bugzillaClient.Login(configuration.UserName, configuration.Password, true, configuration.IgnoreCert);

             // We do not need to push changes to Defects that have been processed as we could break their state.
             if(SkipCloseActions(bugId, bugzillaClient))
@@ -153,7 +185,7 @@
 			}

             ResolveBugIfRequired(configuration.OnStateChangeResolveValue, bugId, bugzillaClient);
-			bugzillaClient.Logout();
+			//bugzillaClient.Logout();
 			return true;
 		}

@@ -173,13 +205,15 @@

             if(!string.IsNullOrEmpty(reassignValue))
             {
-                var bug = client.GetBug(bugId);
-                var user = client.GetUser(bug.AssignedToID);
-
-                if(!string.IsNullOrEmpty(user.Login) && user.Login.Equals(reassignValue))
-                {
-                    return true;
-                }
+                //valid the AssignTo user
+
+                return client.IsValidUser(reassignValue);
+                //var bug = client.GetBug(bugId);
+                //var user = client.GetUser(bug.AssignedToID);
+                //if(!string.IsNullOrEmpty(user.Login) && user.Login.Equals(reassignValue))
+                //{
+                //    return ;
+                // }
             }

             return false;


Code clean

Code clean

--- WalletWasabi.Gui/Controls/LockScreen/SlideLockScreenViewModel.cs
+++ WalletWasabi.Gui/Controls/LockScreen/SlideLockScreenViewModel.cs
@@ -136,7 +136,9 @@
 							_state = SlideLockState.UserDragPassedThreshold;
 						}
 						else
+						{
 							_state = SlideLockState.Idle;
+						}
 					}
 					break;


Fixed issue with creating / saving languages

--- WebApplication/Admin/Views/PageHandlers/Languages/Detail.aspx.cs
+++ WebApplication/Admin/Views/PageHandlers/Languages/Detail.aspx.cs
@@ -33,6 +33,7 @@
         private void UpdateObjectFromFields()
         {
             selectedItem.Name = Name.Text;
+            selectedItem.DisplayName = Name.Text;
             selectedItem.CultureCode = CultureCode.Text;
             selectedItem.UriSegment = UriSegment.Text;
             selectedItem.Description = Description.Text;


cleaned up removal on destroy

cleaned up removal on destroy

--- Assets/HoloToolkit/Input/Scripts/InputSources/InteractionInputSource.cs
+++ Assets/HoloToolkit/Input/Scripts/InputSources/InteractionInputSource.cs
@@ -292,18 +292,13 @@
             InteractionManager.SourceReleased -= InteractionManager_InteractionSourceReleased;
             InteractionManager.SourceLost -= InteractionManager_InteractionSourceLost;
 #endif
+
             InteractionSourceState[] states = InteractionManager.GetCurrentReading();
             for (var i = 0; i < states.Length; i++)
             {
-                GetOrAddSourceData(states[i].source);
+                // NOTE: We don't care whether the source ID previously existed or not, so we blindly call Remove:
+                sourceIdToData.Remove(states[i].source.id);
                 InputManager.Instance.RaiseSourceLost(this, states[i].source.id);
-            }
-
-            foreach (InteractionSourceState iss in InteractionManager.GetCurrentReading())
-            {
-                // NOTE: We don't care whether the source ID previously existed or not, so we blindly call Remove:
-                sourceIdToData.Remove(iss.source.id);
-                InputManager.Instance.RaiseSourceLost(this, iss.source.id);
             }
 #endif
         }
@@ -389,6 +384,7 @@
             {
                 GestureRecognizer.StopCapturingGestures();
             }
+
             if (NavigationGestureRecognizer != null && NavigationGestureRecognizer.IsCapturingGestures())
             {
                 NavigationGestureRecognizer.StopCapturingGestures();


Added null handler in case GetAllBaseTypes returns a null collection

--- CopaceticSoftware.CodeGenerator.StarterKit/Extensions/TypeExtensions.cs
+++ CopaceticSoftware.CodeGenerator.StarterKit/Extensions/TypeExtensions.cs
@@ -194,7 +194,7 @@
             if (includeBaseTypes)
             {
                 var baseTypeAttributes =
-                    type.GetAllBaseTypes()
+                    (type.GetAllBaseTypes() ?? new IType[]{})
                         .Where(bt => bt.FullName != type.FullName && !bt.IsKnownType(KnownTypeCode.Object))
                         .SelectMany(baseType => baseType.GetAttributes(true, includeNonInheritedAttributes));


clear code

clear code

--- Demos/FromShaderDesigner1.5.9.4/FormShaderDesigner1594Demos/FormXRay.cs
+++ Demos/FromShaderDesigner1.5.9.4/FormShaderDesigner1594Demos/FormXRay.cs
@@ -24,12 +24,8 @@
     public partial class FormXRay : Form
     {
         SimpleUIAxis uiLeftBottomAxis;
-        SimpleUIAxis uiLeftTopAxis;
-        SimpleUIAxis uiRightBottomAxis;
-        SimpleUIAxis uiRightTopAxis;

         AxisElement axisElement;
-        AxisElement2 axisElement2;

         Camera camera;

@@ -57,27 +53,13 @@
             IUILayoutParam param;
             param = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, padding, size);
             uiLeftBottomAxis = new SimpleUIAxis(param);
-            param = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Top, padding, size);
-            uiLeftTopAxis = new SimpleUIAxis(param);
-            param = new IUILayoutParam(AnchorStyles.Right | AnchorStyles.Bottom, padding, size);
-            uiRightBottomAxis = new SimpleUIAxis(param);
-            param = new IUILayoutParam(AnchorStyles.Right | AnchorStyles.Top, padding, size);
-            uiRightTopAxis = new SimpleUIAxis(param);

             uiLeftBottomAxis.Initialize();
-            uiLeftTopAxis.Initialize();
-            uiRightBottomAxis.Initialize();
-            uiRightTopAxis.Initialize();

             axisElement = new AxisElement();
             axisElement.Initialize();
             axisElement.BeforeRendering += axisElement_BeforeRendering;
             axisElement.AfterRendering += axisElement_AfterRendering;
-
-            axisElement2 = new AxisElement2();
-            axisElement2.Initialize();
-            axisElement2.BeforeRendering += axisElement2_BeforeRendering;
-            axisElement2.AfterRendering += axisElement2_AfterRendering;

             this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
             this.glCanvas1.KeyPress += glCanvas1_KeyPress;
@@ -132,32 +114,6 @@
             element.SetShaderProgram(mvp);
         }

-        void axisElement2_AfterRendering(object sender, CSharpGL.Objects.RenderEventArgs e)
-        {
-            AxisElement2 element = sender as AxisElement2;
-
-            element.shaderProgram.Unbind();
-        }
-
-        void axisElement2_BeforeRendering(object sender, CSharpGL.Objects.RenderEventArgs e)
-        {
-            AxisElement2 element = sender as AxisElement2;
-
-            mat4 projectionMatrix = camera.GetProjectionMat4();
-            projectionMatrix = glm.translate(projectionMatrix, new vec3(translateX, translateY, translateZ));//
-
-            mat4 viewMatrix = camera.GetViewMat4();
-
-            mat4 modelMatrix = mat4.identity();
-
-            ShaderProgram shaderProgram = element.shaderProgram;
-
-            shaderProgram.Bind();
-
-            shaderProgram.SetUniformMatrix4(AxisElement2.strprojectionMatrix, projectionMatrix.to_array());
-            shaderProgram.SetUniformMatrix4(AxisElement2.strviewMatrix, viewMatrix.to_array());
-            shaderProgram.SetUniformMatrix4(AxisElement2.strmodelMatrix, modelMatrix.to_array());
-        }

         private void glCanvas1_MouseWheel(object sender, MouseEventArgs e)
         {
@@ -179,20 +135,8 @@

             var arg = new RenderEventArgs(RenderModes.Render, this.camera);

-            if (this.renderState == 2 || this.renderState == 4)
-            {
-                axisElement.Render(arg);
-            }
-
-            if (this.renderState == 3 || this.renderState == 4)
-            {
-                axisElement2.Render(arg);
-            }
-
+            axisElement.Render(arg);
             uiLeftBottomAxis.Render(arg);
-            uiLeftTopAxis.Render(arg);
-            uiRightBottomAxis.Render(arg);
-            uiRightTopAxis.Render(arg);

         }

@@ -232,15 +176,11 @@
             builder.Append(string.Format(" target:{0}", this.camera.Target));
             builder.Append(string.Format(" up:{0}", this.camera.UpVector));
             builder.Append(string.Format(" camera type: {0}", this.camera.CameraType));
-            builder.Append(string.Format(" rendering: {0}, {1}",
-                this.renderState == 2 || this.renderState == 4,
-                this.renderState == 3 || this.renderState == 4));

         }

         float translateX = 0, translateY = 0, translateZ = 0;
         const float interval = 0.1f;
-        private int renderState = 4;

         private void glCanvas1_KeyPress(object sender, KeyPressEventArgs e)
         {
@@ -258,22 +198,6 @@
                         throw new NotImplementedException();
                 }
             }
-            else if (e.KeyChar == '1')
-            {
-                this.renderState = 1;
-            }
-            else if (e.KeyChar == '2')
-            {
-                this.renderState = 2;
-            }
-            else if (e.KeyChar == '3')
-            {
-                this.renderState = 3;
-            }
-            else if (e.KeyChar == '4')
-            {
-                this.renderState = 4;
-            }
             else if (e.KeyChar == 'w')
             {
                 translateY += interval;


Lagt Behandlingsansvarlig til rett namespace

--- Difi.SikkerDigitalPost.Klient.Domene/Deprecated/Behandlingsansvarlig.cs
+++ Difi.SikkerDigitalPost.Klient.Domene/Deprecated/Behandlingsansvarlig.cs
@@ -16,7 +16,7 @@
 using Difi.SikkerDigitalPost.Klient.Domene.Entiteter;
 using Difi.SikkerDigitalPost.Klient.Domene.Entiteter.Aktører;

-namespace Difi.SikkerDigitalPost.Klient.Domene.Aktører
+namespace Difi.SikkerDigitalPost.Klient.Domene.Entiteter.Aktører
 {
     [Obsolete("Behandlingsansvarlig heter nå Avsender, da behandlingsansvarlig vil for alle praktiske formål være avsenderen." +
               " Ingen andre endringer er gjort, og overgang kan gjøres uten bieffekter.")]


task 3 half

task 3 half


Upgrade items based on their title rather than their id, because the id of items can change if the database changes.

--- Tibialyzer/Managers/StorageManager.cs
+++ Tibialyzer/Managers/StorageManager.cs
@@ -305,13 +305,14 @@
             return item;
         }

-        private static void UpdateItem(int itemid, bool discard, bool convert, long value, SQLiteTransaction transaction) {
-            if (_itemIdMap.ContainsKey(itemid)) {
-                _itemIdMap[itemid].discard = discard;
-                _itemIdMap[itemid].convert_to_gold = convert;
-                _itemIdMap[itemid].actual_value = value;
-            }
-            SQLiteCommand command = new SQLiteCommand(String.Format("UPDATE Items SET discard={1},convert_to_gold={2},actual_value={3} WHERE id={0}", itemid, discard ? 1 : 0, convert ? 1 : 0, value), conn, transaction);
+        private static void UpdateItem(string title, bool discard, bool convert, long value, SQLiteTransaction transaction) {
+            if (_itemNameMap.ContainsKey(title)) {
+                Item item = _itemNameMap[title];
+                item.discard = discard;
+                item.convert_to_gold = convert;
+                item.actual_value = value;
+            }
+            SQLiteCommand command = new SQLiteCommand(String.Format("UPDATE Items SET discard={1},convert_to_gold={2},actual_value={3} WHERE LOWER(title)=\"{0}\"", title.Replace("\"", "\\\""), discard ? 1 : 0, convert ? 1 : 0, value), conn, transaction);
             command.ExecuteNonQuery();
         }

@@ -1169,15 +1170,15 @@
         }

         public static void UpdateDatabase(SQLiteConnection databaseConnection) {
-            SQLiteCommand comm = new SQLiteCommand("SELECT id, discard, convert_to_gold, actual_value FROM Items", databaseConnection);
+            SQLiteCommand comm = new SQLiteCommand("SELECT title, discard, convert_to_gold, actual_value FROM Items", databaseConnection);
             SQLiteDataReader reader = comm.ExecuteReader();
             using (var transaction = conn.BeginTransaction()) {
                 while (reader.Read()) {
-                    int itemid = reader.GetInt32(0);
+                    string title = reader["title"].ToString().ToLower();
                     bool discard = reader.GetBoolean(1);
                     bool convert = reader.GetBoolean(2);
                     long value = reader.IsDBNull(3) ? DATABASE_NULL : reader.GetInt64(3);
-                    UpdateItem(itemid, discard, convert, value, transaction);
+                    UpdateItem(title, discard, convert, value, transaction);
                 }
                 transaction.Commit();
             }


html body email

html body email

--- MasDev.Common/Core/MasDev.Common.Core.Mono/Source/Mailing/MailClient.cs
+++ MasDev.Common/Core/MasDev.Common.Core.Mono/Source/Mailing/MailClient.cs
@@ -5,7 +5,7 @@
 {
 	public static class MailClient
 	{
-		public static void SendViaGmail (string to, string subject, string body, string username, string password, string senderEmail, string senderAlias, bool htmlBody)
+		public static void SendViaGmail (string subject, string body, string username, string password, string senderEmail, string senderAlias, bool htmlBody, params string[] to)
 		{
 			Send ("smtp.gmail.com", 587, subject, body, username, password, senderEmail, senderAlias, htmlBody, to);
 		}