In SOP, replaced many references to private members with the public properties

--- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -257,7 +257,6 @@
         private string m_touchName = String.Empty;
         private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5);
         private readonly Stack<UndoState> m_redo = new Stack<UndoState>(5);
-        private UUID _creatorID;

         private bool m_passTouches;

@@ -343,19 +342,14 @@
             m_name = "Primitive";

             Rezzed = DateTime.UtcNow;
-            _creationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
-            _ownerID = ownerID;
-            _creatorID = _ownerID;
-            _lastOwnerID = UUID.Zero;
+            CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
+            LastOwnerID = CreatorID = OwnerID = ownerID;
             UUID = UUID.Random();
             Shape = shape;
-            // Todo: Add More Object Parameter from above!
-            _ownershipCost = 0;
-            _objectSaleType = 0;
-            _salePrice = 0;
-            _category = 0;
-            _lastOwnerID = _creatorID;
-            // End Todo: ///
+            OwnershipCost = 0;
+            ObjectSaleType = 0;
+            SalePrice = 0;
+            Category = 0;
             GroupPosition = groupPosition;
             OffsetPosition = offsetPosition;
             RotationOffset = rotationOffset;
@@ -400,20 +394,15 @@
         private DateTime m_expires;
         private DateTime m_rezzed;
         private bool m_createSelected = false;
+
+        private UUID _creatorID;
+        public UUID CreatorID
+        {
+            get { return _creatorID; }
+            set { _creatorID = value; }
+        }
+
         private string m_creatorData = string.Empty;
-
-        public UUID CreatorID
-        {
-            get
-            {
-                return _creatorID;
-            }
-            set
-            {
-                _creatorID = value;
-            }
-        }
-
         /// <summary>
         /// Data about the creator in the form profile_url;name
         /// </summary>
@@ -432,16 +421,16 @@
         {
             get
             {
-                if (m_creatorData != null && m_creatorData != string.Empty)
-                    return _creatorID.ToString() + ';' + m_creatorData;
+                if (CreatorData != null && CreatorData != string.Empty)
+                    return CreatorID.ToString() + ';' + CreatorData;
                 else
-                    return _creatorID.ToString();
+                    return CreatorID.ToString();
             }
             set
             {
                 if ((value == null) || (value != null && value == string.Empty))
                 {
-                    m_creatorData = string.Empty;
+                    CreatorData = string.Empty;
                     return;
                 }

@@ -449,7 +438,7 @@
                 {
                     UUID uuid = UUID.Zero;
                     UUID.TryParse(value, out uuid);
-                    _creatorID = uuid;
+                    CreatorID = uuid;
                 }
                 else // <uuid>[;<endpoint>[;name]]
                 {
@@ -459,14 +448,14 @@
                     {
                         UUID uuid = UUID.Zero;
                         UUID.TryParse(parts[0], out uuid);
-                        _creatorID = uuid;
+                        CreatorID = uuid;
                     }
                     if (parts.Length >= 2)
-                        m_creatorData = parts[1];
+                        CreatorData = parts[1];
                     if (parts.Length >= 3)
                         name = parts[2];

-                    m_creatorData += ';' + name;
+                    CreatorData += ';' + name;

                 }
             }
@@ -684,14 +673,14 @@
             {
                 // If this is a linkset, we don't want the physics engine mucking up our group position here.
                 PhysicsActor actor = PhysActor;
-                if (actor != null && _parentID == 0)
+                if (actor != null && ParentID == 0)
                 {
                     m_groupPosition = actor.Position;
                 }

-                if (m_parentGroup.IsAttachment)
-                {
-                    ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
+                if (ParentGroup.IsAttachment)
+                {
+                    ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
                     if (sp != null)
                         return sp.AbsolutePosition;
                 }
@@ -708,7 +697,7 @@
                     try
                     {
                         // Root prim actually goes at Position
-                        if (_parentID == 0)
+                        if (ParentID == 0)
                         {
                             actor.Position = value;
                         }
@@ -720,7 +709,7 @@
                         }

                         // Tell the physics engines that this prim changed.
-                        m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
+                        ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
                     }
                     catch (Exception e)
                     {
@@ -729,10 +718,10 @@
                 }

                 // TODO if we decide to do sitting in a more SL compatible way (multiple avatars per prim), this has to be fixed, too
-                if (m_sitTargetAvatar != UUID.Zero)
+                if (SitTargetAvatar != UUID.Zero)
                 {
                     ScenePresence avatar;
-                    if (m_parentGroup.Scene.TryGetScenePresence(m_sitTargetAvatar, out avatar))
+                    if (ParentGroup.Scene.TryGetScenePresence(SitTargetAvatar, out avatar))
                     {
                         avatar.ParentPosition = GetWorldPosition();
                     }
@@ -751,14 +740,14 @@
                 if (ParentGroup != null && !ParentGroup.IsDeleted)
                 {
                     PhysicsActor actor = PhysActor;
-                    if (_parentID != 0 && actor != null)
+                    if (ParentID != 0 && actor != null)
                     {
                         actor.Position = GetWorldPosition();
                         actor.Orientation = GetWorldRotation();

                         // Tell the physics engines that this prim changed.
-                        if (m_parentGroup.Scene != null)
-                            m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
+                        if (ParentGroup.Scene != null)
+                            ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
                     }
                 }
             }
@@ -770,7 +759,7 @@
             {
                 if (IsRoot)
                 {
-                    if (m_parentGroup.IsAttachment)
+                    if (ParentGroup.IsAttachment)
                         return AttachedPos;
                     else
                         return AbsolutePosition;
@@ -788,7 +777,7 @@
             {
                 // We don't want the physics engine mucking up the rotations in a linkset
                 PhysicsActor actor = PhysActor;
-                if (_parentID == 0 && (Shape.PCode != 9 || Shape.State == 0)  && actor != null)
+                if (ParentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null)
                 {
                     if (actor.Orientation.X != 0f || actor.Orientation.Y != 0f
                         || actor.Orientation.Z != 0f || actor.Orientation.W != 0f)
@@ -818,7 +807,7 @@
                     try
                     {
                         // Root prim gets value directly
-                        if (_parentID == 0)
+                        if (ParentID == 0)
                         {
                             actor.Orientation = value;
                             //m_log.Info("[PART]: RO1:" + actor.Orientation.ToString());
@@ -831,8 +820,8 @@
                             //m_log.Info("[PART]: RO2:" + actor.Orientation.ToString());
                         }

-                        if (m_parentGroup != null)
-                            m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
+                        if (ParentGroup != null)
+                            ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
                         //}
                     }
                     catch (Exception ex)
@@ -877,7 +866,7 @@
                     if (actor.IsPhysical)
                     {
                         actor.Velocity = value;
-                        m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
+                        ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
                     }
                 }
             }
@@ -1012,9 +1001,9 @@
                     PhysicsActor actor = PhysActor;
                     if (actor != null)
                     {
-                        if (m_parentGroup.Scene != null)
+                        if (ParentGroup.Scene != null)
                         {
-                            if (m_parentGroup.Scene.PhysicsScene != null)
+                            if (ParentGroup.Scene.PhysicsScene != null)
                             {
                                 actor.Size = m_shape.Scale;

@@ -1076,7 +1065,7 @@
         {
             get
             {
-                if (m_parentGroup.IsAttachment)
+                if (ParentGroup.IsAttachment)
                     return GroupPosition;

                 return m_offsetPosition + m_groupPosition;
@@ -1086,6 +1075,7 @@
         public SceneObjectGroup ParentGroup
         {
             get { return m_parentGroup; }
+            private set { m_parentGroup = value; }
         }

         public scriptEvents ScriptEvents
@@ -1388,7 +1378,7 @@
         /// </summary>
         public void AddFullUpdateToAllAvatars()
         {
-            m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
+            ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
             {
                 AddFullUpdateToAvatar(avatar);
             });
@@ -1415,7 +1405,7 @@
         /// Terse updates
         public void AddTerseUpdateToAllAvatars()
         {
-            m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
+            ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
             {
                 AddTerseUpdateToAvatar(avatar);
             });
@@ -1453,7 +1443,7 @@
             if (volume < 0)
                 volume = 0;

-            m_parentGroup.Scene.ForEachRootClient(delegate(IClientAPI client)
+            ParentGroup.Scene.ForEachRootClient(delegate(IClientAPI client)
             {
                 client.SendAttachedSoundGainChange(UUID, (float)volume);
             });
@@ -1479,9 +1469,9 @@
                 impulse = newimpulse;
             }

-            if (m_parentGroup != null)
-            {
-                m_parentGroup.applyImpulse(impulse);
+            if (ParentGroup != null)
+            {
+                ParentGroup.applyImpulse(impulse);
             }
         }

@@ -1505,7 +1495,7 @@
                 impulse = newimpulse;
             }

-            m_parentGroup.applyAngularImpulse(impulse);
+            ParentGroup.applyAngularImpulse(impulse);
         }

         /// <summary>
@@ -1528,7 +1518,7 @@
                 impulse = newimpulse;
             }

-            m_parentGroup.setAngularImpulse(impulse);
+            ParentGroup.setAngularImpulse(impulse);
         }

         /// <summary>
@@ -1560,11 +1550,11 @@

                 // The only time the physics scene shouldn't know about the prim is if it's phantom or an attachment, which is phantom by definition
                 // or flexible
-                if (!isPhantom && !m_parentGroup.IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible))
+                if (!isPhantom && !ParentGroup.IsAttachment && !(Shape.PathCurve == (byte)Extrusion.Flexible))
                 {
                     try
                     {
-                        PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
+                        PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
                                 string.Format("{0}/{1}", Name, UUID),
                                 Shape,
                                 AbsolutePosition,
@@ -1631,8 +1621,8 @@
             if (!userExposed)
                 dupe.PhysActor = null;

-            dupe._ownerID = AgentID;
-            dupe._groupID = GroupID;
+            dupe.OwnerID = AgentID;
+            dupe.GroupID = GroupID;
             dupe.GroupPosition = GroupPosition;
             dupe.OffsetPosition = OffsetPosition;
             dupe.RotationOffset = RotationOffset;
@@ -1641,10 +1631,10 @@
             dupe.AngularVelocity = new Vector3(0, 0, 0);
             dupe.Flags = Flags;

-            dupe._ownershipCost = _ownershipCost;
-            dupe._objectSaleType = _objectSaleType;
-            dupe._salePrice = _salePrice;
-            dupe._category = _category;
+            dupe.OwnershipCost = OwnershipCost;
+            dupe.ObjectSaleType = ObjectSaleType;
+            dupe.SalePrice = SalePrice;
+            dupe.Category = Category;
             dupe.m_rezzed = m_rezzed;

             dupe.m_inventory = new SceneObjectPartInventory(dupe);
@@ -1663,7 +1653,7 @@
             // Move afterwards ResetIDs as it clears the localID
             dupe.LocalId = localID;
             // This may be wrong...    it might have to be applied in SceneObjectGroup to the object that's being duplicated.
-            dupe._lastOwnerID = OwnerID;
+            dupe.LastOwnerID = OwnerID;

             byte[] extraP = new byte[Shape.ExtraParams.Length];
             Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
@@ -1750,7 +1740,7 @@
                     }
                 }

-                SceneObjectPart trackedBody = m_parentGroup.Scene.GetSceneObjectPart(trackedBodyName); // FIXME: causes a sequential lookup
+                SceneObjectPart trackedBody = ParentGroup.Scene.GetSceneObjectPart(trackedBodyName); // FIXME: causes a sequential lookup
                 Quaternion localRotation = Quaternion.Identity;
                 if (trackedBody != null)
                 {
@@ -1763,7 +1753,7 @@

                 PhysicsJoint joint;

-                joint = m_parentGroup.Scene.PhysicsScene.RequestJointCreation(Name, jointType,
+                joint = ParentGroup.Scene.PhysicsScene.RequestJointCreation(Name, jointType,
                     AbsolutePosition,
                     this.RotationOffset,
                     Description,
@@ -1788,7 +1778,7 @@
                 else
                 {
                     // here we turn off the joint object, so remove the joint from the physics scene
-                    m_parentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed?
+                    ParentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed?

                     // make sure client isn't interpolating the joint proxy object
                     Velocity = Vector3.Zero;
@@ -1830,7 +1820,7 @@
                             if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints && (!isNew))
                             {
                                 // destroy all joints connected to this now deactivated body
-                                m_parentGroup.Scene.PhysicsScene.RemoveAllJointsConnectedToActorThreadLocked(PhysActor);
+                                ParentGroup.Scene.PhysicsScene.RemoveAllJointsConnectedToActorThreadLocked(PhysActor);
                             }

                             // stop client-side interpolation of all joint proxy objects that have just been deleted
@@ -1864,7 +1854,7 @@

                                 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
                                 PhysActor.OnOutOfBounds += PhysicsOutOfBounds;
-                                if (_parentID != 0 && _parentID != LocalId)
+                                if (ParentID != 0 && ParentID != LocalId)
                                 {
                                     if (ParentGroup.RootPart.PhysActor != null)
                                     {
@@ -1880,7 +1870,7 @@
                     if (Shape.SculptEntry)
                         CheckSculptAndLoad();
                     else
-                        m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
+                        ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
                 }
             }
         }
@@ -1903,58 +1893,58 @@

         public bool GetDieAtEdge()
         {
-            if (m_parentGroup.IsDeleted)
+            if (ParentGroup.IsDeleted)
                 return false;

-            return m_parentGroup.RootPart.DIE_AT_EDGE;
+            return ParentGroup.RootPart.DIE_AT_EDGE;
         }

         public bool GetReturnAtEdge()
         {
-            if (m_parentGroup.IsDeleted)
+            if (ParentGroup.IsDeleted)
                 return false;

-            return m_parentGroup.RootPart.RETURN_AT_EDGE;
+            return ParentGroup.RootPart.RETURN_AT_EDGE;
         }

         public void SetReturnAtEdge(bool p)
         {
-            if (m_parentGroup.IsDeleted)
+            if (ParentGroup.IsDeleted)
                 return;

-            m_parentGroup.RootPart.RETURN_AT_EDGE = p;
+            ParentGroup.RootPart.RETURN_AT_EDGE = p;
         }

         public bool GetBlockGrab()
         {
-            if (m_parentGroup.IsDeleted)
+            if (ParentGroup.IsDeleted)
                 return false;

-            return m_parentGroup.RootPart.BlockGrab;
+            return ParentGroup.RootPart.BlockGrab;
         }

         public void SetBlockGrab(bool p)
         {
-            if (m_parentGroup.IsDeleted)
+            if (ParentGroup.IsDeleted)
                 return;

-            m_parentGroup.RootPart.BlockGrab = p;
+            ParentGroup.RootPart.BlockGrab = p;
         }

         public void SetStatusSandbox(bool p)
         {
-            if (m_parentGroup.IsDeleted)
+            if (ParentGroup.IsDeleted)
                 return;
-            StatusSandboxPos = m_parentGroup.RootPart.AbsolutePosition;
-            m_parentGroup.RootPart.StatusSandbox = p;
+            StatusSandboxPos = ParentGroup.RootPart.AbsolutePosition;
+            ParentGroup.RootPart.StatusSandbox = p;
         }

         public bool GetStatusSandbox()
         {
-            if (m_parentGroup.IsDeleted)
+            if (ParentGroup.IsDeleted)
                 return false;

-            return m_parentGroup.RootPart.StatusSandbox;
+            return ParentGroup.RootPart.StatusSandbox;
         }

         public int GetAxisRotation(int axis)
@@ -2064,7 +2054,7 @@
         {
             if (tau > 0)
             {
-                m_parentGroup.moveToTarget(target, tau);
+                ParentGroup.moveToTarget(target, tau);
             }
             else
             {
@@ -2080,12 +2070,12 @@
         /// <param name="tau">Number of seconds over which to reach target</param>
         public void SetHoverHeight(float height, PIDHoverType hoverType, float tau)
         {
-            m_parentGroup.SetHoverHeight(height, hoverType, tau);
+            ParentGroup.SetHoverHeight(height, hoverType, tau);
         }

         public void StopHover()
         {
-            m_parentGroup.SetHoverHeight(0f, PIDHoverType.Ground, 0f);
+            ParentGroup.SetHoverHeight(0f, PIDHoverType.Ground, 0f);
         }

         public virtual void OnGrab(Vector3 offsetPos, IClientAPI remoteClient)
@@ -2136,7 +2126,7 @@
                 m_lastColliders.Remove(localID);
             }

-            if (m_parentGroup.IsDeleted)
+            if (ParentGroup.IsDeleted)
                 return;

             // play the sound.
@@ -2145,7 +2135,7 @@
                 SendSound(CollisionSound.ToString(), CollisionSoundVolume, true, (byte)0, 0, false, false);
             }

-            if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision_start) != 0)
+            if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.collision_start) != 0)
             {
                 // do event notification
                 if (startedColliders.Count > 0)
@@ -2156,30 +2146,30 @@
                     {
                         if (localId == 0)
                             continue;
-
-                        if (m_parentGroup.Scene == null)
+
+                        if (ParentGroup.Scene == null)
                             return;
-
-                        SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId);
+
+                        SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
                         string data = "";
                         if (obj != null)
                         {
-                            if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString())
-                                || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
+                            if (ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString())
+                                || ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
                             {
-                                bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
+                                bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
                                 //If it is 1, it is to accept ONLY collisions from this object
                                 if (found)
                                 {
                                     DetectedObject detobj = new DetectedObject();
                                     detobj.keyUUID = obj.UUID;
                                     detobj.nameStr = obj.Name;
-                                    detobj.ownerUUID = obj._ownerID;
+                                    detobj.ownerUUID = obj.OwnerID;
                                     detobj.posVector = obj.AbsolutePosition;
                                     detobj.rotQuat = obj.GetWorldRotation();
                                     detobj.velVector = obj.Velocity;
                                     detobj.colliderType = 0;
-                                    detobj.groupUUID = obj._groupID;
+                                    detobj.groupUUID = obj.GroupID;
                                     colliding.Add(detobj);
                                 }
                                 //If it is 0, it is to not accept collisions from this object
@@ -2189,33 +2179,33 @@
                             }
                             else
                             {
-                                bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
+                                bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
                                 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
                                 if (!found)
                                 {
                                     DetectedObject detobj = new DetectedObject();
                                     detobj.keyUUID = obj.UUID;
                                     detobj.nameStr = obj.Name;
-                                    detobj.ownerUUID = obj._ownerID;
+                                    detobj.ownerUUID = obj.OwnerID;
                                     detobj.posVector = obj.AbsolutePosition;
                                     detobj.rotQuat = obj.GetWorldRotation();
                                     detobj.velVector = obj.Velocity;
                                     detobj.colliderType = 0;
-                                    detobj.groupUUID = obj._groupID;
+                                    detobj.groupUUID = obj.GroupID;
                                     colliding.Add(detobj);
                                 }
                             }
                         }
                         else
                         {
-                            m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
+                            ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
                             {
                                 if (av.LocalId == localId)
                                 {
-                                    if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
-                                        || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
+                                    if (ParentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
+                                        || ParentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
                                     {
-                                        bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
+                                        bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
                                         //If it is 1, it is to accept ONLY collisions from this avatar
                                         if (found)
                                         {
@@ -2237,7 +2227,7 @@
                                     }
                                     else
                                     {
-                                        bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
+                                        bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
                                         //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
                                         if (!found)
                                         {
@@ -2262,8 +2252,8 @@
                     if (colliding.Count > 0)
                     {
                         StartCollidingMessage.Colliders = colliding;
-
-                        if (m_parentGroup.Scene == null)
+
+                        if (ParentGroup.Scene == null)
                             return;

 //                        if (m_parentGroup.PassCollision == true)
@@ -2271,12 +2261,12 @@
 //                            //TODO: Add pass to root prim!
 //                        }

-                        m_parentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage);
+                        ParentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage);
                     }
                 }
             }
-
-            if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision) != 0)
+
+            if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.collision) != 0)
             {
                 if (m_lastColliders.Count > 0)
                 {
@@ -2288,29 +2278,29 @@
                         if (localId == 0)
                             continue;

-                        if (m_parentGroup.Scene == null)
+                        if (ParentGroup.Scene == null)
                             return;

-                        SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId);
+                        SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
                         string data = "";
                         if (obj != null)
                         {
-                            if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString())
-                                || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
+                            if (ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString())
+                                || ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
                             {
-                                bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
+                                bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
                                 //If it is 1, it is to accept ONLY collisions from this object
                                 if (found)
                                 {
                                     DetectedObject detobj = new DetectedObject();
                                     detobj.keyUUID = obj.UUID;
                                     detobj.nameStr = obj.Name;
-                                    detobj.ownerUUID = obj._ownerID;
+                                    detobj.ownerUUID = obj.OwnerID;
                                     detobj.posVector = obj.AbsolutePosition;
                                     detobj.rotQuat = obj.GetWorldRotation();
                                     detobj.velVector = obj.Velocity;
                                     detobj.colliderType = 0;
-                                    detobj.groupUUID = obj._groupID;
+                                    detobj.groupUUID = obj.GroupID;
                                     colliding.Add(detobj);
                                 }
                                 //If it is 0, it is to not accept collisions from this object
@@ -2320,33 +2310,33 @@
                             }
                             else
                             {
-                                bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
+                                bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
                                 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
                                 if (!found)
                                 {
                                     DetectedObject detobj = new DetectedObject();
                                     detobj.keyUUID = obj.UUID;
                                     detobj.nameStr = obj.Name;
-                                    detobj.ownerUUID = obj._ownerID;
+                                    detobj.ownerUUID = obj.OwnerID;
                                     detobj.posVector = obj.AbsolutePosition;
                                     detobj.rotQuat = obj.GetWorldRotation();
                                     detobj.velVector = obj.Velocity;
                                     detobj.colliderType = 0;
-                                    detobj.groupUUID = obj._groupID;
+                                    detobj.groupUUID = obj.GroupID;
                                     colliding.Add(detobj);
                                 }
                             }
                         }
                         else
                         {
-                            m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
+                            ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
                             {
                                 if (av.LocalId == localId)
                                 {
-                                    if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
-                                        || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
+                                    if (ParentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
+                                        || ParentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
                                     {
-                                        bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
+                                        bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
                                         //If it is 1, it is to accept ONLY collisions from this avatar
                                         if (found)
                                         {
@@ -2368,7 +2358,7 @@
                                     }
                                     else
                                     {
-                                        bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
+                                        bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
                                         //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
                                         if (!found)
                                         {
@@ -2393,15 +2383,15 @@
                     {
                         CollidingMessage.Colliders = colliding;

-                        if (m_parentGroup.Scene == null)
+                        if (ParentGroup.Scene == null)
                             return;

-                        m_parentGroup.Scene.EventManager.TriggerScriptColliding(LocalId, CollidingMessage);
+                        ParentGroup.Scene.EventManager.TriggerScriptColliding(LocalId, CollidingMessage);
                     }
                 }
             }

-            if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision_end) != 0)
+            if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.collision_end) != 0)
             {
                 if (endedColliders.Count > 0)
                 {
@@ -2412,28 +2402,28 @@
                         if (localId == 0)
                             continue;

-                        if (m_parentGroup.Scene == null)
+                        if (ParentGroup.Scene == null)
                             return;

-                        SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId);
+                        SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
                         string data = "";
                         if (obj != null)
                         {
-                            if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
+                            if (ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
                             {
-                                bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
+                                bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
                                 //If it is 1, it is to accept ONLY collisions from this object
                                 if (found)
                                 {
                                     DetectedObject detobj = new DetectedObject();
                                     detobj.keyUUID = obj.UUID;
                                     detobj.nameStr = obj.Name;
-                                    detobj.ownerUUID = obj._ownerID;
+                                    detobj.ownerUUID = obj.OwnerID;
                                     detobj.posVector = obj.AbsolutePosition;
                                     detobj.rotQuat = obj.GetWorldRotation();
                                     detobj.velVector = obj.Velocity;
                                     detobj.colliderType = 0;
-                                    detobj.groupUUID = obj._groupID;
+                                    detobj.groupUUID = obj.GroupID;
                                     colliding.Add(detobj);
                                 }
                                 //If it is 0, it is to not accept collisions from this object
@@ -2443,33 +2433,33 @@
                             }
                             else
                             {
-                                bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
+                                bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
                                 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
                                 if (!found)
                                 {
                                     DetectedObject detobj = new DetectedObject();
                                     detobj.keyUUID = obj.UUID;
                                     detobj.nameStr = obj.Name;
-                                    detobj.ownerUUID = obj._ownerID;
+                                    detobj.ownerUUID = obj.OwnerID;
                                     detobj.posVector = obj.AbsolutePosition;
                                     detobj.rotQuat = obj.GetWorldRotation();
                                     detobj.velVector = obj.Velocity;
                                     detobj.colliderType = 0;
-                                    detobj.groupUUID = obj._groupID;
+                                    detobj.groupUUID = obj.GroupID;
                                     colliding.Add(detobj);
                                 }
                             }
                         }
                         else
                         {
-                            m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
+                            ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
                             {
                                 if (av.LocalId == localId)
                                 {
-                                    if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
-                                        || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
+                                    if (ParentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
+                                        || ParentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
                                     {
-                                        bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
+                                        bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
                                         //If it is 1, it is to accept ONLY collisions from this avatar
                                         if (found)
                                         {
@@ -2491,7 +2481,7 @@
                                     }
                                     else
                                     {
-                                        bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
+                                        bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
                                         //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
                                         if (!found)
                                         {
@@ -2517,15 +2507,15 @@
                     {
                         EndCollidingMessage.Colliders = colliding;

-                        if (m_parentGroup.Scene == null)
+                        if (ParentGroup.Scene == null)
                             return;

-                        m_parentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage);
+                        ParentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage);
                     }
                 }
             }

-            if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_start) != 0)
+            if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_start) != 0)
             {
                 if (startedColliders.Count > 0)
                 {
@@ -2540,7 +2530,7 @@
                             detobj.keyUUID = UUID.Zero;
                             detobj.nameStr = "";
                             detobj.ownerUUID = UUID.Zero;
-                            detobj.posVector = m_parentGroup.RootPart.AbsolutePosition;
+                            detobj.posVector = ParentGroup.RootPart.AbsolutePosition;
                             detobj.rotQuat = Quaternion.Identity;
                             detobj.velVector = Vector3.Zero;
                             detobj.colliderType = 0;
@@ -2553,15 +2543,15 @@
                     {
                         LandStartCollidingMessage.Colliders = colliding;

-                        if (m_parentGroup.Scene == null)
+                        if (ParentGroup.Scene == null)
                             return;

-                        m_parentGroup.Scene.EventManager.TriggerScriptLandCollidingStart(LocalId, LandStartCollidingMessage);
+                        ParentGroup.Scene.EventManager.TriggerScriptLandCollidingStart(LocalId, LandStartCollidingMessage);
                     }
                 }
             }

-            if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision) != 0)
+            if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.land_collision) != 0)
             {
                 if (m_lastColliders.Count > 0)
                 {
@@ -2576,7 +2566,7 @@
                             detobj.keyUUID = UUID.Zero;
                             detobj.nameStr = "";
                             detobj.ownerUUID = UUID.Zero;
-                            detobj.posVector = m_parentGroup.RootPart.AbsolutePosition;
+                            detobj.posVector = ParentGroup.RootPart.AbsolutePosition;
                             detobj.rotQuat = Quaternion.Identity;
                             detobj.velVector = Vector3.Zero;
                             detobj.colliderType = 0;
@@ -2589,15 +2579,15 @@
                     {
                         LandCollidingMessage.Colliders = colliding;

-                        if (m_parentGroup.Scene == null)
+                        if (ParentGroup.Scene == null)
                             return;

-                        m_parentGroup.Scene.EventManager.TriggerScriptLandColliding(LocalId, LandCollidingMessage);
+                        ParentGroup.Scene.EventManager.TriggerScriptLandColliding(LocalId, LandCollidingMessage);
                     }
                 }
             }

-            if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_end) != 0)
+            if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_end) != 0)
             {
                 if (endedColliders.Count > 0)
                 {
@@ -2612,7 +2602,7 @@
                             detobj.keyUUID = UUID.Zero;
                             detobj.nameStr = "";
                             detobj.ownerUUID = UUID.Zero;
-                            detobj.posVector = m_parentGroup.RootPart.AbsolutePosition;
+                            detobj.posVector = ParentGroup.RootPart.AbsolutePosition;
                             detobj.rotQuat = Quaternion.Identity;
                             detobj.velVector = Vector3.Zero;
                             detobj.colliderType = 0;
@@ -2625,10 +2615,10 @@
                     {
                         LandEndCollidingMessage.Colliders = colliding;

-                        if (m_parentGroup.Scene == null)
+                        if (ParentGroup.Scene == null)
                             return;

-                        m_parentGroup.Scene.EventManager.TriggerScriptLandCollidingEnd(LocalId, LandEndCollidingMessage);
+                        ParentGroup.Scene.EventManager.TriggerScriptLandCollidingEnd(LocalId, LandEndCollidingMessage);
                     }
                 }
             }
@@ -2640,7 +2630,7 @@

             RemFlag(PrimFlags.Physics);
             DoPhysicsPropertyUpdate(false, true);
-            //m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
+            //ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
         }

         public void PhysicsRequestingTerseUpdate()
@@ -2649,15 +2639,15 @@
             {
                 Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0);

-                if (m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.N)
-                    | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.S)
-                    | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.E)
-                    | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.W))
-                {
-                    m_parentGroup.AbsolutePosition = newpos;
+                if (ParentGroup.Scene.TestBorderCross(newpos, Cardinals.N)
+                    | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.S)
+                    | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.E)
+                    | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.W))
+                {
+                    ParentGroup.AbsolutePosition = newpos;
                     return;
                 }
-                //m_parentGroup.RootPart.m_groupPosition = newpos;
+                //ParentGroup.RootPart.m_groupPosition = newpos;
             }
             ScheduleTerseUpdate();

@@ -2688,7 +2678,7 @@
                 }
             }

-            m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
+            ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
             {
                 if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100))
                     sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID);
@@ -2773,7 +2763,7 @@

         public void rotLookAt(Quaternion target, float strength, float damping)
         {
-            if (m_parentGroup.IsAttachment)
+            if (ParentGroup.IsAttachment)
             {
                 /*
                     ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
@@ -2809,10 +2799,10 @@
         {
 //            m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId);

-            if (m_parentGroup == null)
+            if (ParentGroup == null)
                 return;

-            m_parentGroup.QueueForUpdateCheck();
+            ParentGroup.QueueForUpdateCheck();

             int timeNow = Util.UnixTimeSinceEpoch();

@@ -2841,13 +2831,13 @@
         /// </summary>
         public void ScheduleTerseUpdate()
         {
-            if (m_parentGroup == null)
+            if (ParentGroup == null)
                 return;

             if (UpdateFlag == UpdateRequired.NONE)
             {
-                m_parentGroup.HasGroupChanged = true;
-                m_parentGroup.QueueForUpdateCheck();
+                ParentGroup.HasGroupChanged = true;
+                ParentGroup.QueueForUpdateCheck();

                 TimeStampTerse = (uint) Util.UnixTimeSinceEpoch();
                 UpdateFlag = UpdateRequired.TERSE;
@@ -2860,7 +2850,7 @@

         public void ScriptSetPhysicsStatus(bool UsePhysics)
         {
-            m_parentGroup.ScriptSetPhysicsStatus(UsePhysics);
+            ParentGroup.ScriptSetPhysicsStatus(UsePhysics);
         }

         /// <summary>
@@ -2887,7 +2877,7 @@
                         // Update the physics actor with the new loaded sculpt data and set the taint signal.
                         PhysActor.Shape = m_shape;

-                        m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
+                        ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
                     }
                 }
             }
@@ -2900,7 +2890,7 @@
         /// <param name="clientFlags"></param>
         protected internal void SendFullUpdate(IClientAPI remoteClient, uint clientFlags)
         {
-            if (m_parentGroup == null)
+            if (ParentGroup == null)
                 return;

 //            m_log.DebugFormat(
@@ -2908,7 +2898,7 @@

             if (IsRoot)
             {
-                if (m_parentGroup.IsAttachment)
+                if (ParentGroup.IsAttachment)
                 {
                     SendFullUpdateToClient(remoteClient, AttachedPos, clientFlags);
                 }
@@ -2928,10 +2918,10 @@
         /// </summary>
         public void SendFullUpdateToAllClients()
         {
-            if (m_parentGroup == null)
+            if (ParentGroup == null)
                 return;

-            m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
+            ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
             {
                 SendFullUpdate(avatar.ControllingClient, avatar.GenerateClientFlags(UUID));
             });
@@ -2943,10 +2933,10 @@
         /// <param name="agentID"></param>
         public void SendFullUpdateToAllClientsExcept(UUID agentID)
         {
-            if (m_parentGroup == null)
+            if (ParentGroup == null)
                 return;

-            m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
+            ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
             {
                 // Ugly reference :(
                 if (avatar.UUID != agentID)
@@ -2991,7 +2981,7 @@

             clientFlags &= ~(uint) PrimFlags.CreateSelected;

-            if (remoteClient.AgentId == _ownerID)
+            if (remoteClient.AgentId == OwnerID)
             {
                 if ((Flags & PrimFlags.CreateSelected) != 0)
                 {
@@ -3067,13 +3057,13 @@
             if (volume < 0)
                 volume = 0;

-            UUID ownerID = _ownerID;
+            UUID ownerID = OwnerID;
             UUID objectID = ParentGroup.RootPart.UUID;
             UUID parentID = ParentGroup.UUID;

             UUID soundID = UUID.Zero;
             Vector3 position = AbsolutePosition; // region local
-            ulong regionHandle = m_parentGroup.Scene.RegionInfo.RegionHandle;
+            ulong regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle;

             if (!UUID.TryParse(sound, out soundID))
             {
@@ -3094,7 +3084,7 @@
             if (soundID == UUID.Zero)
                 return;

-            ISoundModule soundModule = m_parentGroup.Scene.RequestModuleInterface<ISoundModule>();
+            ISoundModule soundModule = ParentGroup.Scene.RequestModuleInterface<ISoundModule>();
             if (soundModule != null)
             {
                 if (useMaster)
@@ -3106,7 +3096,7 @@
                         else
                             soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
                         ParentGroup.PlaySoundMasterPrim = this;
-                        ownerID = _ownerID;
+                        ownerID = OwnerID;
                         objectID = ParentGroup.RootPart.UUID;
                         parentID = ParentGroup.UUID;
                         position = AbsolutePosition; // region local
@@ -3117,7 +3107,7 @@
                             soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
                         foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims)
                         {
-                            ownerID = prim._ownerID;
+                            ownerID = prim.OwnerID;
                             objectID = prim.ParentGroup.RootPart.UUID;
                             parentID = prim.ParentGroup.UUID;
                             position = prim.AbsolutePosition; // region local
@@ -3150,7 +3140,7 @@
         /// </summary>
         public void SendTerseUpdateToAllClients()
         {
-            m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
+            ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
             {
                 SendTerseUpdateToClient(avatar.ControllingClient);
             });
@@ -3158,7 +3148,7 @@

         public void SetAxisRotation(int axis, int rotate)
         {
-            m_parentGroup.SetAxisRotation(axis, rotate);
+            ParentGroup.SetAxisRotation(axis, rotate);

             //Cannot use ScriptBaseClass constants as no referance to it currently.
             if (axis == 2)//STATUS_ROTATE_X
@@ -3181,10 +3171,10 @@

         public void SetDieAtEdge(bool p)
         {
-            if (m_parentGroup.IsDeleted)
+            if (ParentGroup.IsDeleted)
                 return;

-            m_parentGroup.RootPart.DIE_AT_EDGE = p;
+            ParentGroup.RootPart.DIE_AT_EDGE = p;
         }

         public void SetFloatOnWater(int floatYN)
@@ -3426,7 +3416,7 @@

         public void SetGroup(UUID groupID, IClientAPI client)
         {
-            _groupID = groupID;
+            GroupID = groupID;
             if (client != null)
                 SendPropertiesToClient(client);
             UpdateFlag = UpdateRequired.FULL;
@@ -3437,13 +3427,13 @@
         /// </summary>
         public void SetParent(SceneObjectGroup parent)
         {
-            m_parentGroup = parent;
+            ParentGroup = parent;
         }

         // Use this for attachments!  LocalID should be avatar's localid
         public void SetParentLocalId(uint localID)
         {
-            _parentID = localID;
+            ParentID = localID;
         }

         public void SetPhysicsAxisRotation()
@@ -3451,7 +3441,7 @@
             if (PhysActor != null)
             {
                 PhysActor.LockAngularMotion(RotationAxis);
-                m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
+                ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
             }
         }

@@ -3499,9 +3489,9 @@

         public void StopLookAt()
         {
-            m_parentGroup.stopLookAt();
-
-            m_parentGroup.ScheduleGroupForTerseUpdate();
+            ParentGroup.stopLookAt();
+
+            ParentGroup.ScheduleGroupForTerseUpdate();
         }

         /// <summary>
@@ -3521,10 +3511,10 @@

         public void StopMoveToTarget()
         {
-            m_parentGroup.stopMoveToTarget();
-
-            m_parentGroup.ScheduleGroupForTerseUpdate();
-            //m_parentGroup.ScheduleGroupForFullUpdate();
+            ParentGroup.stopMoveToTarget();
+
+            ParentGroup.ScheduleGroupForTerseUpdate();
+            //ParentGroup.ScheduleGroupForFullUpdate();
         }

         public void StoreUndoState()
@@ -3563,7 +3553,7 @@
     //                                "[SCENE OBJECT PART]: Storing undo state for {0} {1}, forGroup {2}, initial stack size {3}",
     //                                Name, LocalId, forGroup, m_undo.Count);

-                            if (m_parentGroup.GetSceneMaxUndo() > 0)
+                            if (ParentGroup.GetSceneMaxUndo() > 0)
                             {
                                 UndoState nUndo = new UndoState(this, forGroup);

@@ -3619,7 +3609,7 @@
                     {
                         UndoState nUndo = null;

-                        if (m_parentGroup.GetSceneMaxUndo() > 0)
+                        if (ParentGroup.GetSceneMaxUndo() > 0)
                         {
                             nUndo = new UndoState(this, goback.ForGroup);
                         }
@@ -3651,7 +3641,7 @@

                     if (gofwd != null)
                     {
-                        if (m_parentGroup.GetSceneMaxUndo() > 0)
+                        if (ParentGroup.GetSceneMaxUndo() > 0)
                         {
                             UndoState nUndo = new UndoState(this, gofwd.ForGroup);

@@ -4126,17 +4116,17 @@

         public void TriggerScriptChangedEvent(Changed val)
         {
-            if (m_parentGroup != null && m_parentGroup.Scene != null)
-                m_parentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val);
+            if (ParentGroup != null && ParentGroup.Scene != null)
+                ParentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val);
         }

         public void TrimPermissions()
         {
-            _baseMask &= (uint)PermissionMask.All;
-            _ownerMask &= (uint)PermissionMask.All;
-            _groupMask &= (uint)PermissionMask.All;
-            _everyoneMask &= (uint)PermissionMask.All;
-            _nextOwnerMask &= (uint)PermissionMask.All;
+            BaseMask &= (uint)PermissionMask.All;
+            OwnerMask &= (uint)PermissionMask.All;
+            GroupMask &= (uint)PermissionMask.All;
+            EveryoneMask &= (uint)PermissionMask.All;
+            NextOwnerMask &= (uint)PermissionMask.All;
         }

         public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
@@ -4147,7 +4137,7 @@
             {
                 if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero)
                 {
-                    m_parentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived);
+                    ParentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived);
                 }
             }

@@ -4210,46 +4200,46 @@
         public void UpdatePermissions(UUID AgentID, byte field, uint localID, uint mask, byte addRemTF)
         {
             bool set = addRemTF == 1;
-            bool god = m_parentGroup.Scene.Permissions.IsGod(AgentID);
-
-            uint baseMask = _baseMask;
+            bool god = ParentGroup.Scene.Permissions.IsGod(AgentID);
+
+            uint baseMask = BaseMask;
             if (god)
                 baseMask = 0x7ffffff0;

             // Are we the owner?
-            if ((AgentID == _ownerID) || god)
+            if ((AgentID == OwnerID) || god)
             {
                 switch (field)
                 {
                     case 1:
                         if (god)
                         {
-                            _baseMask = ApplyMask(_baseMask, set, mask);
+                            BaseMask = ApplyMask(BaseMask, set, mask);
                             Inventory.ApplyGodPermissions(_baseMask);
                         }

                         break;
                     case 2:
-                        _ownerMask = ApplyMask(_ownerMask, set, mask) &
+                        OwnerMask = ApplyMask(OwnerMask, set, mask) &
                                 baseMask;
                         break;
                     case 4:
-                        _groupMask = ApplyMask(_groupMask, set, mask) &
+                        GroupMask = ApplyMask(GroupMask, set, mask) &
                                 baseMask;
                         break;
                     case 8:
-                        _everyoneMask = ApplyMask(_everyoneMask, set, mask) &
+                        EveryoneMask = ApplyMask(EveryoneMask, set, mask) &
                                 baseMask;
                         break;
                     case 16:
-                        _nextOwnerMask = ApplyMask(_nextOwnerMask, set, mask) &
+                        NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) &
                                 baseMask;
                         // Prevent the client from creating no mod, no copy
                         // objects
-                        if ((_nextOwnerMask & (uint)PermissionMask.Copy) == 0)
-                            _nextOwnerMask |= (uint)PermissionMask.Transfer;
-
-                        _nextOwnerMask |= (uint)PermissionMask.Move;
+                        if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0)
+                            NextOwnerMask |= (uint)PermissionMask.Transfer;
+
+                        NextOwnerMask |= (uint)PermissionMask.Move;

                         break;
                 }
@@ -4263,7 +4253,7 @@
             // For now, we use the NINJA naming scheme for identifying joints.
             // In the future, we can support other joint specification schemes such as a
             // custom checkbox in the viewer GUI.
-            if (m_parentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
+            if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
             {
                 string hingeString = "hingejoint";
                 return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString);
@@ -4279,7 +4269,7 @@
             // For now, we use the NINJA naming scheme for identifying joints.
             // In the future, we can support other joint specification schemes such as a
             // custom checkbox in the viewer GUI.
-            if (m_parentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
+            if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
             {
                 string ballString = "balljoint";
                 return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString);
@@ -4295,7 +4285,7 @@
             // For now, we use the NINJA naming scheme for identifying joints.
             // In the future, we can support other joint specification schemes such as a
             // custom checkbox in the viewer GUI.
-            if (m_parentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
+            if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
             {
                 return IsHingeJoint() || IsBallJoint();
             }
@@ -4361,11 +4351,11 @@
                 {
                     DoPhysicsPropertyUpdate(UsePhysics, false);

-                    if (!m_parentGroup.IsDeleted)
-                    {
-                        if (LocalId == m_parentGroup.RootPart.LocalId)
+                    if (!ParentGroup.IsDeleted)
+                    {
+                        if (LocalId == ParentGroup.RootPart.LocalId)
                         {
-                            m_parentGroup.CheckSculptAndLoad();
+                            ParentGroup.CheckSculptAndLoad();
                         }
                     }
                 }
@@ -4398,7 +4388,7 @@
                 if (PhysActor == null)
                 {
                     // It's not phantom anymore. So make sure the physics engine get's knowledge of it
-                    PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
+                    PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
                         string.Format("{0}/{1}", Name, UUID),
                         Shape,
                         AbsolutePosition,
@@ -4410,11 +4400,11 @@
                     PhysActor.SetMaterial(Material);
                     DoPhysicsPropertyUpdate(UsePhysics, true);

-                    if (!m_parentGroup.IsDeleted)
-                    {
-                        if (LocalId == m_parentGroup.RootPart.LocalId)
+                    if (!ParentGroup.IsDeleted)
+                    {
+                        if (LocalId == ParentGroup.RootPart.LocalId)
                         {
-                            m_parentGroup.CheckSculptAndLoad();
+                            ParentGroup.CheckSculptAndLoad();
                         }
                     }

@@ -4436,11 +4426,11 @@
                 {
                     DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. If it's phantom this will remove the prim

-                    if (!m_parentGroup.IsDeleted)
-                    {
-                        if (LocalId == m_parentGroup.RootPart.LocalId)
+                    if (!ParentGroup.IsDeleted)
+                    {
+                        if (LocalId == ParentGroup.RootPart.LocalId)
                         {
-                            m_parentGroup.CheckSculptAndLoad();
+                            ParentGroup.CheckSculptAndLoad();
                         }
                     }
                 }
@@ -4552,7 +4542,7 @@
             if (PhysActor != null)
             {
                 PhysActor.Shape = m_shape;
-                m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
+                ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
             }

             // This is what makes vehicle trailers work
@@ -4713,18 +4703,18 @@

             //if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0)
             //{
-            //    m_parentGroup.Scene.EventManager.OnScriptTimerEvent += handleTimerAccounting;
+            //    ParentGroup.Scene.EventManager.OnScriptTimerEvent += handleTimerAccounting;
             //}
             //else
             //{
-            //    m_parentGroup.Scene.EventManager.OnScriptTimerEvent -= handleTimerAccounting;
+            //    ParentGroup.Scene.EventManager.OnScriptTimerEvent -= handleTimerAccounting;
             //}

             LocalFlags = (PrimFlags)objectflagupdate;

-            if (m_parentGroup != null && m_parentGroup.RootPart == this)
-            {
-                m_parentGroup.aggregateScriptEvents();
+            if (ParentGroup != null && ParentGroup.RootPart == this)
+            {
+                ParentGroup.aggregateScriptEvents();
             }
             else
             {
@@ -4792,14 +4782,14 @@

         public void AddScriptLPS(int count)
         {
-            m_parentGroup.AddScriptLPS(count);
+            ParentGroup.AddScriptLPS(count);
         }

         public void ApplyNextOwnerPermissions()
         {
-            _baseMask &= _nextOwnerMask;
-            _ownerMask &= _nextOwnerMask;
-            _everyoneMask &= _nextOwnerMask;
+            BaseMask &= NextOwnerMask;
+            OwnerMask &= NextOwnerMask;
+            EveryoneMask &= NextOwnerMask;

             Inventory.ApplyNextOwnerPermissions();
         }


Minor change

Minor change

--- WWCP_OCHPv1.4/Messages/CPO2CH/CheckCDRsResponse.cs
+++ WWCP_OCHPv1.4/Messages/CPO2CH/CheckCDRsResponse.cs
@@ -403,7 +403,7 @@
             if ((Object) CheckCDRsResponse == null)
                 return false;

-            return this.Result.Equals(CheckCDRsResponse.Result);
+            return Result.Equals(CheckCDRsResponse.Result);

         }


Use an early return for Linkify's null check so the Regex for URL decoding doesn't fail.

--- Opserver/Views/Exceptions/Exceptions.Detail.cshtml
+++ Opserver/Views/Exceptions/Exceptions.Detail.cshtml
@@ -95,12 +95,15 @@

     private string Linkify(string s)
     {
+        if (string.IsNullOrEmpty(s))
+            return s;
+
         if (Regex.IsMatch(s, @"%[A-Z0-9][A-Z0-9]"))
         {
             s = Server.UrlDecode(s);
         }

-        if (s != null && Regex.IsMatch(s, "^(https?|ftp|file)://"))
+        if (Regex.IsMatch(s, "^(https?|ftp|file)://"))
         {
             //@* || (Regex.IsMatch(s, "/[^ /,]+/") && !s.Contains("/LM"))*@ // block special case of "/LM/W3SVC/1"
             var sane = SanitizeUrl(s);


updated the EditBid controller

updated the EditBid controller

--- Web/Areas/Procurement/Controllers/BidController.cs
+++ Web/Areas/Procurement/Controllers/BidController.cs
@@ -345,10 +345,14 @@
         public ActionResult Create(Bid bid)
         {

-            if (IsBidMadeForThisForRegion(bid.RegionID,bid.BidNumber))
+            if (!IsBidMadeForThisForRegion(bid.RegionID,bid.BidNumber))
             {
                 ModelState.AddModelError("Error","This Region is already registered with this Bid No. Please choose another Region!");
-                return View();
+                ViewBag.StatusID = new SelectList(_statusService.GetAllStatus(), "StatusID", "Name");
+                ViewBag.BidPlanID = bid.TransportBidPlanID;
+                ViewBag.TransportBidPlanID = new SelectList(_transportBidPlanService.GetAllTransportBidPlan(), "TransportBidPlanID", "ShortName", bid.TransportBidPlanID);
+                ViewBag.RegionID = new SelectList(_adminUnitService.GetRegions(), "AdminUnitID", "Name");
+                return View(bid);
             }

             if (ModelState.IsValid)
@@ -376,7 +380,7 @@
             ViewBag.StatusID = new SelectList(_statusService.GetAllStatus(), "StatusID", "Name");
             ViewBag.BidPlanID = bid.TransportBidPlanID;
             ViewBag.TransportBidPlanID = new SelectList(_transportBidPlanService.GetAllTransportBidPlan(), "TransportBidPlanID", "ShortName", bid.TransportBidPlanID);
-            ViewBag.Regions = new SelectList(_adminUnitService.GetRegions(), "AdminUnitID", "Name");
+            ViewBag.RegionID = new SelectList(_adminUnitService.GetRegions(), "AdminUnitID", "Name");
             return View(bid);

             //return View("Index", _bidService.GetAllBid());
@@ -466,11 +470,7 @@
         [HttpPost]
         public ActionResult EditBidStatus(Bid bid)
         {
-            if (IsBidMadeForThisForRegion(bid.RegionID, bid.BidNumber))
-            {
-                ModelState.AddModelError("Error", "Can not edit. This Region is already registered with this Bid No. Please choose another Region!");
-                return View();
-            }
+

             if (ModelState.IsValid)
             {
@@ -480,6 +480,7 @@
             ViewBag.StatusID = new SelectList(_statusService.GetAllStatus(), "StatusID", "Name", bid.StatusID);
             ViewBag.TransportBidPlanID = new SelectList(_transportBidPlanService.GetAllTransportBidPlan(),
                                                         "TransportBidPlanID", "ShortName", bid.TransportBidPlanID);
+            ViewBag.RegionID = new SelectList(_adminUnitService.GetRegions(), "AdminUnitID", "Name");
            // return View("Index", _bidService.GetAllBid());
             return View(bid);
         }


Use the LivePreviewSurface directly instead of making a copy of it.

- Save memory caused by creating unnecessary extra surface.
- Save time by not cloning surface.
- Fix an issue where live previews for translucent layers are drawn incorrectly until committed.

--- Pinta.Gui.Widgets/Widgets/Canvas/CanvasRenderer.cs
+++ Pinta.Gui.Widgets/Widgets/Canvas/CanvasRenderer.cs
@@ -18,7 +18,6 @@
 	{
 		private Size source_size;
 		private Size destination_size;
-		private Layer scratch_layer;
 		private Layer offset_layer;

 		private ScaleFactor scale_factor;
@@ -54,22 +53,6 @@
 			dst.MarkDirty ();
 		}

-		private Layer ScratchLayer {
-			get {
-				// Create one if we don't have one
-				if (scratch_layer == null)
-					scratch_layer = new Layer (new Cairo.ImageSurface (Cairo.Format.ARGB32, source_size.Width, source_size.Height));
-
-				// If we have the wrong size one, dispose it and create the correct size
-				if (scratch_layer.Surface.Width != source_size.Width || scratch_layer.Surface.Height != source_size.Height) {
-					(scratch_layer.Surface as IDisposable).Dispose ();
-					scratch_layer = new Layer (new Cairo.ImageSurface (Cairo.Format.ARGB32, source_size.Width, source_size.Height));
-				}
-
-				return scratch_layer;
-			}
-		}
-
 		private Layer OffsetLayer {
 			get {
 				// Create one if we don't have one
@@ -88,28 +71,14 @@

 		private Layer CreateLivePreviewLayer (Layer original)
 		{
-			var scratch = ScratchLayer;
-			scratch.Surface.Clear ();
-
-			using (var g = new Cairo.Context (scratch.Surface)) {
-				g.SetSource (original.Surface);
-				g.Paint ();
-
-				g.Save ();
-
-				g.AppendPath (PintaCore.Layers.SelectionPath);
-				g.Clip ();
-				g.SetSource (PintaCore.LivePreview.LivePreviewSurface);
-				g.Paint ();
-
-				g.Restore ();
-			}
-
-			scratch.BlendMode = original.BlendMode;
-			scratch.Offset = original.Offset;
-			scratch.Opacity = original.Opacity;
-
-			return scratch;
+			var preview_layer = new Layer (PintaCore.LivePreview.LivePreviewSurface);
+
+			preview_layer.BlendMode = original.BlendMode;
+			preview_layer.Offset = original.Offset;
+			preview_layer.Opacity = original.Opacity;
+			preview_layer.Hidden = original.Hidden;
+
+			return preview_layer;
 		}

 		private Layer CreateOffsetLayer (Layer original, Point canvas_offset)


Green: Can pass custom points map to strategy

--- PlayerRank/Scoring/Simple/SimpleScoringStrategy.cs
+++ PlayerRank/Scoring/Simple/SimpleScoringStrategy.cs
@@ -1,12 +1,11 @@
 using System.Collections.Generic;
 using System.Linq;
-using System.Linq.Expressions;

 namespace PlayerRank.Scoring.Simple
 {
     public class SimpleScoringStrategy : IScoringStrategy
     {
-        private readonly Dictionary<Position, Points> m_PositionToPoints = new Dictionary<Position, Points>();
+        private readonly IDictionary<Position, Points> m_PositionToPoints = new Dictionary<Position, Points>();

         public SimpleScoringStrategy()
         {
@@ -20,6 +19,11 @@
             m_PositionToPoints.Add(new Position(8), new Points(3));
             m_PositionToPoints.Add(new Position(9), new Points(2));
             m_PositionToPoints.Add(new Position(10), new Points(1));
+        }
+
+        public SimpleScoringStrategy(IDictionary<Position, Points> pointsMap)
+        {
+            m_PositionToPoints = pointsMap;
         }

         public void Reset()


DontCreateAnyFilesIfAllPagesAreUnpublished, OnlyCreateAsManyFilesAsThereArePublishedPages and DoNotCreateOutputForAnUnpublishedPage - Green

--- PrehensilePonyTail/PPTail.SiteGenerator/Builder.cs
+++ PrehensilePonyTail/PPTail.SiteGenerator/Builder.cs
@@ -37,12 +37,13 @@
             var pages = _contentRepo.GetAllPages();
             foreach (var page in pages)
             {
-                // All all content pages to the results
-                result.Add(new SiteFile()
-                {
-                    RelativeFilePath = $".\\Pages\\{page.Slug}.{_pageFilenameExtension}",
-                    Content = ""
-                });
+                // All all published content pages to the results
+                if (page.IsPublished)
+                    result.Add(new SiteFile()
+                    {
+                        RelativeFilePath = $".\\Pages\\{page.Slug}.{_pageFilenameExtension}",
+                        Content = ""
+                    });
             }

             return result;


improved tooltip positioning and timeout

--- WpfView/Components/Chart/Chart.TooltipAndLegend.cs
+++ WpfView/Components/Chart/Chart.TooltipAndLegend.cs
@@ -73,9 +73,12 @@
         private void DataMouseEnter(object sender, EventArgs e)
         {
             if (DataTooltip == null) return;
+
+            TooltipTimeoutTimer.Stop();
+
             if (DataTooltip.Parent == null)
             {
-                AddToView(DataTooltip);
+                AddToDrawMargin(DataTooltip);
                 Canvas.SetTop(DataTooltip, 0d);
                 Canvas.SetLeft(DataTooltip, 0d);
             }
@@ -135,10 +138,16 @@
             DataTooltip.Visibility = Visibility.Visible;
             DataTooltip.UpdateLayout();

+            var xt = senderPoint.ChartLocation.X;
+            var yt = senderPoint.ChartLocation.Y;
+
+            xt = xt > DrawMargin.Width/2 ? xt - DataTooltip.ActualWidth - 5 : xt + 5;
+            yt = yt > DrawMargin.Height/2 ? yt - DataTooltip.ActualHeight - 5 : yt + 5;
+
+            DataTooltip.BeginAnimation(Canvas.LeftProperty,
+                new DoubleAnimation(xt, TimeSpan.FromMilliseconds(200)));
             DataTooltip.BeginAnimation(Canvas.TopProperty,
-                new DoubleAnimation(senderPoint.ChartLocation.Y, TimeSpan.FromMilliseconds(200)));
-            DataTooltip.BeginAnimation(Canvas.LeftProperty,
-                new DoubleAnimation(senderPoint.ChartLocation.X, TimeSpan.FromMilliseconds(200)));
+                new DoubleAnimation(yt, TimeSpan.FromMilliseconds(200)));
         }

         private void DataMouseLeave(object sender, EventArgs e)


fixed a defect with address building code

--- Purchasing.Web/Views/Workgroup/_AddressForm.cshtml
+++ Purchasing.Web/Views/Workgroup/_AddressForm.cshtml
@@ -35,8 +35,7 @@
 					</div>
 					<div class="editor-field">
 						@Html.EditorFor(model => model.WorkgroupAddress.Building)
-                        @*<input type="text" id="WorkgroupAddress_Building" name="WorkgroupAddress.Building" />*@
-                        @Html.HiddenFor(model => model.WorkgroupAddress.BuildingCode)
+                        @Html.Hidden("WorkgroupAddress.BuildingCode", Model.WorkgroupAddress != null ? Model.WorkgroupAddress.BuildingCode.Id : string.Empty)
 						@Html.ValidationMessageFor(model => model.WorkgroupAddress.Building)
 					</div>
 				</li>


TsGlobal fox

TsGlobal fox

--- Reinforced.Typings/Attributes/TsGlobalAttribute.cs
+++ Reinforced.Typings/Attributes/TsGlobalAttribute.cs
@@ -77,5 +77,13 @@
         /// </summary>
         public double Priority { get; set; }

+        /// <summary>
+        /// Default constructor for TsGlobal attribute
+        /// </summary>
+        public TsGlobalAttribute()
+        {
+            WriteWarningComment = true;
+            TabSymbol = "\t";
+        }
     }
 }


Syncing to TFS

Syncing to TFS

TFS Changeset 1904384

--- Runtime/Microsoft.Scripting.Core/Compiler/ILGen.cs
+++ Runtime/Microsoft.Scripting.Core/Compiler/ILGen.cs
@@ -612,6 +612,8 @@
                typeTo.IsInterface ||
                typeFrom == typeof(object) || // boxing cast
                typeTo == typeof(object) ||
+               typeFrom == typeof(System.Enum) ||
+               typeFrom == typeof(System.ValueType) ||
                TypeUtils.IsLegalExplicitVariantDelegateConversion(typeFrom, typeTo))
             {
                 il.EmitCastToType(typeFrom, typeTo);


Mono emits linebreaks for empty elements, .NET doesn't

--- src/tests/net-core/Diff/DefaultComparisonFormatterTest.cs
+++ src/tests/net-core/Diff/DefaultComparisonFormatterTest.cs
@@ -391,8 +391,8 @@
             Assert.AreEqual("Expected element tag name 'a' but was 'b' - "
                             + "comparing  at /a[1] to  at /b[1]", description);

-            AssertEquals("\n", controlDetails);
-            AssertEquals("\n", testDetails);
+            AssertEqualsNoLineBreak("", controlDetails);
+            AssertEqualsNoLineBreak("", testDetails);
         }

         [Test]
@@ -412,8 +412,8 @@
             Assert.AreEqual("Expected number of attributes '1' but was '2' - "
                             + "comparing  at /a[1] to  at /a[1]", description);

-            AssertEquals("\n", controlDetails);
-            AssertEquals("\n", testDetails);
+            AssertEqualsNoLineBreak("", controlDetails);
+            AssertEqualsNoLineBreak("", testDetails);
         }

         [Test]
@@ -432,8 +432,8 @@
             Assert.AreEqual("Expected attribute value 'xxx' but was 'yyy' - "
                             + "comparing  at /a[1]/@b to  at /a[1]/@b", description);

-            AssertEquals("\n", controlDetails);
-            AssertEquals("\n", testDetails);
+            AssertEqualsNoLineBreak("", controlDetails);
+            AssertEqualsNoLineBreak("", testDetails);
         }

         [Test]
@@ -515,8 +515,8 @@
             Assert.AreEqual("Expected attribute name '/a[1]/@b' - "
                             + "comparing  at /a[1]/@b to  at /a[1]", description);

-            AssertEquals("\n", controlDetails);
-            AssertEquals("\n", testDetails);
+            AssertEqualsNoLineBreak("", controlDetails);
+            AssertEqualsNoLineBreak("", testDetails);
         }

         [Test]
@@ -569,10 +569,17 @@
 #endif

         ///
-        ///   Assert Equals for two strings where carriage returns removed.
+        ///   Assert Equals for two strings where carriage returns are removed.
         ///
         public static void AssertEquals(string expected, string actual) {
-            Assert.AreEqual(expected, actual.Replace("\r", ""));
+            Assert.AreEqual(expected, actual.Replace("\r", string.Empty));
+        }
+
+        ///
+        ///   Assert Equals for two strings where linefeeds and carriage returns are removed.
+        ///
+        public static void AssertEqualsNoLineBreak(string expected, string actual) {
+            AssertEquals(expected, actual.Replace("\n", string.Empty));
         }

         private void AssertPreRequirements(Diff diff, ComparisonType comparisonType) {


Small change.

Small change.

--- Samples/Common/SampleStrategies/MainWindow.xaml.cs
+++ Samples/Common/SampleStrategies/MainWindow.xaml.cs
@@ -73,7 +73,7 @@
 			// ecng.serialization invoke in several places IStorage obj
 			ConfigManager.RegisterService(entityRegistry.Storage);

-			var storageRegistry = ConfigManager.GetService<IStorageRegistry>();
+			var storageRegistry = ServicesRegistry.StorageRegistry;
 			var snapshotRegistry = new SnapshotRegistry(Path.Combine("Data", "Snapshots"));

 			Connector = new Connector(entityRegistry, storageRegistry, snapshotRegistry);
@@ -171,7 +171,7 @@

 			Connector.Dispose();

-			ConfigManager.GetService<IEntityRegistry>().DelayAction.DefaultGroup.WaitFlush(true);
+			ServicesRegistry.EntityRegistry.DelayAction.DefaultGroup.WaitFlush(true);

 			base.OnClosing(e);
 		}


Remove now-unused Optional constructor

Remove now-unused Optional constructor

--- DSharpPlus/Entities/Optional.cs
+++ DSharpPlus/Entities/Optional.cs
@@ -37,19 +37,7 @@
             this._val = value;
             this.HasValue = true;
         }
-
-        ///
-        /// FOR INTERNAL USE ONLY! See <see cref="OptionalJsonConverter.ReadJson"/>. Having a method that takes an
-        /// object and casts it saves a lot of time building type parameters.
-        ///
Creates a new <see cref="Optional{T}"/> with specified value.

-        ///
-        /// <param name="value">Value of this option.</param>
-        internal Optional(object value)
-        {
-            this._val = (T) value; // not a safe cast.
-            this.HasValue = true;
-        }
-
+
         ///
         /// Returns a string representation of this optional value.
         ///


Seeds are now hashed. Without this the first random sample for nearby seeds (1,2,3, etc.) are very similar (have a similar bit pattern). Thanks to Francois Guibert for identifying this problem.

--- SharpNeatV2/src/SharpNeatLib/Utility/FastRandom.cs
+++ SharpNeatV2/src/SharpNeatLib/Utility/FastRandom.cs
@@ -65,6 +65,11 @@
     ///   - Added NextByte() method.
     ///   - Added new statically declared seedRng FastRandom to allow easy creation of multiple FastRandoms with different seeds
     ///     within a single clock tick.
+    ///
+    /// Colin Green, 2011-10-04
+    ///  - Seeds are now hashed. Without this the first random sample for nearby seeds (1,2,3, etc.) are very similar
+    ///    (have a similar bit pattern). Thanks to Francois Guibert for identifying this problem.
+    ///
     /// </summary>
     public class FastRandom
     {
@@ -120,8 +125,22 @@
         {
             // The only stipulation stated for the xorshift RNG is that at least one of
             // the seeds x,y,z,w is non-zero. We fulfill that requirement by only allowing
-            // resetting of the x seed
-            _x = (uint)seed;
+            // resetting of the x seed.
+
+            // The first random sample will be very closely related to the value of _x we set here.
+            // Thus setting _x = seed will result in a close correlation between the bit patterns of the seed and
+            // the first random sample, therefore if the seed has a pattern (e.g. 1,2,3) then there will also be
+            // a recognisable pattern across the first random samples.
+            //
+            // Such a strong correlation between the seed and the first random sample is an undesirable
+            // charactersitic of a RNG, therefore we significantly weaken any correlation by hashing the seed's bits.
+            // This is achieved by multiplying the seed with four large primes each with bits distributed over the
+            // full length of a 32bit value, finally adding the results to give _x.
+            _x = (uint)(  (seed * 1431655781)
+                        + (seed * 1183186591)
+                        + (seed * 622729787)
+                        + (seed * 338294347));
+
             _y = Y;
             _z = Z;
             _w = W;


much better cache service usage thanks to Faded ♥

--- SoraBot-v2/SoraBot-v2/Services/StarboardService.cs
+++ SoraBot-v2/SoraBot-v2/Services/StarboardService.cs
@@ -64,14 +64,10 @@
                         }
                         //GET MESSAGE
                         //var starMsg = (IUserMessage)await starChannel.GetMessageAsync(starMessage.PostedMsgId);
-                        var starMsg = await CacheService.GetUserMessage(starMessage.PostedMsgId,
-                           new RequestOptions(starChannel, TimeSpan.FromDays(10)));
+                        var starMsg = await CacheService.GetUserMessage(starMessage.PostedMsgId);
+                        //if not found no change happened
                         if (starMsg == null)
-                        {
-                            starMessage.IsPosted = false;
-                            starMessage.StarCount = 0;
-                            continue;
-                        }
+                            continue;
                         int amount;
                         if(!int.TryParse(starMsg.Content.Substring(0,starMsg.Content.IndexOf(" ", StringComparison.Ordinal)).Replace("**", ""), out amount))
                             continue;
@@ -165,6 +161,7 @@
                     if(wasNull)
                         guildDb.StarMessages.Add(starMsg);
                     await soraContext.SaveChangesAsync();
+                    await CacheService.SetDiscordUserMessage(starChannel, starMsg.PostedMsgId, TimeSpan.FromDays(10));
                 }
             }
             catch (Exception e)
@@ -217,6 +214,7 @@
                     starMsg.IsPosted = false;
                 }
                 await soraContext.SaveChangesAsync();
+                await CacheService.SetDiscordUserMessage(starChannel, starMsg.PostedMsgId, TimeSpan.FromDays(10));
             }
         }


Fixed machinests starving to death

Fixed machinests starving to death

--- Pandaros.Settlers/Pandaros.Settlers/Jobs/Machinist.cs
+++ Pandaros.Settlers/Pandaros.Settlers/Jobs/Machinist.cs
@@ -130,10 +130,7 @@

         public override NPCBase.NPCGoal CalculateGoal(ref NPCBase.NPCState state)
         {
-            var nPCGoal = NPCBase.NPCGoal.Bed;
-
-            if (TimeCycle.IsDay)
-                nPCGoal = Caclulate(ref state);
+            var nPCGoal = Caclulate(ref state, true);

             if (nPCGoal != LastNPCGoal)
             {
@@ -144,7 +141,7 @@
             return nPCGoal;
         }

-        public NPCBase.NPCGoal Caclulate(ref NPCBase.NPCState state)
+        public NPCBase.NPCGoal Caclulate(ref NPCBase.NPCState state, bool day)
         {
             if (state.NextNPCShopVisitTimeGameTicks >= TimeCycle.TotalTime.Value.Ticks)
             {
@@ -155,6 +152,7 @@
                 float hoursTillMaxShopHours = hoursTillMinShopHours + (shopHoursMax - shopHoursMin);
                 float hoursTillVisit = Pipliz.Random.NextFloat(hoursTillMinShopHours, hoursTillMaxShopHours);
                 state.NextNPCShopVisitTimeGameTicks = TimeCycle.TotalTime.Value.Add(System.TimeSpan.FromHours(hoursTillVisit)).Ticks;
+                return NPCBase.NPCGoal.NPCShop;
             }

             if (ActionsPreformed > 6)
@@ -162,6 +160,12 @@
                 ActionsPreformed = 0;
                 return NPCBase.NPCGoal.Stockpile;
             }
+
+            if (day && !TimeCycle.IsDay)
+                return NPCBase.NPCGoal.Bed;
+
+            if (TimeCycle.IsDay && !day)
+                return NPCBase.NPCGoal.Bed;

             return NPCBase.NPCGoal.Job;
         }
@@ -187,10 +191,7 @@

         public override NPCBase.NPCGoal CalculateGoal(ref NPCBase.NPCState state)
         {
-            var nPCGoal = NPCBase.NPCGoal.Bed;
-
-            if (!TimeCycle.IsDay)
-                nPCGoal = Caclulate(ref state);
+            var nPCGoal = Caclulate(ref state, false);

             if (nPCGoal != LastNPCGoal)
             {


Registered AppService in the Dependencies registration file

--- ProCultura.Web.Api/App_Start/ContainerRegistration.cs
+++ ProCultura.Web.Api/App_Start/ContainerRegistration.cs
@@ -7,6 +7,7 @@
     using Autofac;
     using Autofac.Integration.WebApi;

+    using Procultura.Application.Services.Events;
     using Procultura.Application.Services.Users;

     using ProCultura.CrossCutting.Encryption;
@@ -44,9 +45,10 @@
         /// <param name="builder"></param>
         private static void RegisterCustomTypes(ContainerBuilder builder)
         {
+            ConfigureDataDependencies(builder);
+            ConfigureDomainDependencies(builder);
             ConfigureCrossCuttingDependencies(builder);
-            ConfigureDomainDependencies(builder);
-            ConfigureDataDependencies(builder);
+            ConfigureApplicationDependencies(builder);
         }

         /// <summary>
@@ -70,7 +72,6 @@
             builder.RegisterType<EntityFrameworkLocalizationService>().As<ILocalizationService>();
             builder.RegisterType<AuthRequestFactory>().As<IAuthRequestFactory>();
             builder.RegisterType<GeneralEncryptionService>().As<IEncryptionService>();
-            builder.RegisterType<UserAppService>().As<IUserAppService>();
         }

         /// <summary>
@@ -84,5 +85,15 @@
             builder.RegisterType<UnitOfWork>().As<IUnitOfWork>();
             builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
         }
+
+        /// <summary>
+        /// Register dependencies registered in the Application layer
+        /// </summary>
+        /// <param name="builder"></param>
+        private static void ConfigureApplicationDependencies(ContainerBuilder builder)
+        {
+            builder.RegisterType<UserAppService>().As<IUserAppService>();
+            builder.RegisterType<EventsAppService>().As<IEventsAppService>();
+        }
     }
 }


Display commit SHA, not "Octokit.GitHubCommit"

--- tools/Google.Cloud.Tools.TagReleases/Program.cs
+++ tools/Google.Cloud.Tools.TagReleases/Program.cs
@@ -86,7 +86,7 @@
             await MakeReleasesAsync(client, newReleases, commit);
             Console.WriteLine();
             Console.WriteLine($"Release tags created. Please start the Kokoro release job with commit hash \"{commit.Sha}\" and wait for an email with the result.");
-            Console.WriteLine($"For a manual release, run ./buildrelease.sh {commit}");
+            Console.WriteLine($"For a manual release, run ./buildrelease.sh {commit.Sha}");
             return 0;
         }


fix 16bpc

fix 16bpc

--- DataTool/Helper/DDSConverter.cs
+++ DataTool/Helper/DDSConverter.cs
@@ -92,12 +92,11 @@
             } catch {
                 if (!didConvert) {
                     var bpc = TexHelper.Instance.BitsPerColor(info.Format);
-                    var isSRGB = TexHelper.Instance.IsSRGB(info.Format);
                     DXGI_FORMAT newFormat;
                     if (bpc <= 8) {
-                        newFormat = isSRGB ? DXGI_FORMAT.R8G8B8A8_UNORM_SRGB : DXGI_FORMAT.R8G8B8A8_UNORM;
+                        newFormat = TexHelper.Instance.IsSRGB(info.Format) ? DXGI_FORMAT.R8G8B8A8_UNORM_SRGB : DXGI_FORMAT.R8G8B8A8_UNORM;
                     } else {
-                        newFormat = isSRGB ? DXGI_FORMAT.R8G8B8A8_UNORM_SRGB : DXGI_FORMAT.R8G8B8A8_UNORM;
+                        newFormat = DXGI_FORMAT.R16G16B16A16_UNORM;
                     }

                     ScratchImage temp = scratch.Convert(newFormat, TEX_FILTER_FLAGS.DEFAULT, 0.5f);


MessageProcessor tests basically done.

MessageProcessor tests basically done.

--- ARGame/Assets/Editor/UnitTests/Network/MessageProcessorTest.cs
+++ ARGame/Assets/Editor/UnitTests/Network/MessageProcessorTest.cs
@@ -180,5 +180,35 @@
         {
             Assert.Null(MessageProcessor.ReadDelete(new byte[16], 3));
         }
+
+        /// <summary>
+        /// Test if correct result is returned when length
+        /// is sufficient.
+        /// </summary>
+        [Test]
+        public void PosUpdateParamTestValid()
+        {
+            Assert.NotNull(MessageProcessor.ReadUpdatePosition(new byte[16], 16));
+        }
+
+        /// <summary>
+        /// Test if correct result is returned when length
+        /// is sufficient.
+        /// </summary>
+        [Test]
+        public void RotUpdateParamTestValid()
+        {
+            Assert.NotNull(MessageProcessor.ReadUpdateRotation(new byte[8], 8));
+        }
+
+        /// <summary>
+        /// Test if correct result is returned when length
+        /// is sufficient.
+        /// </summary>
+        [Test]
+        public void DeleteParamTestValid()
+        {
+            Assert.NotNull(MessageProcessor.ReadDelete(new byte[4], 4));
+        }
     }
 }


Update backtest dates in BasicTemplateFuturesConsolidationAlgorithm

Changed dates to use data files available in GitHub

--- Algorithm.CSharp/BasicTemplateFuturesConsolidationAlgorithm.cs
+++ Algorithm.CSharp/BasicTemplateFuturesConsolidationAlgorithm.cs
@@ -28,10 +28,11 @@
         private const string RootSP500 = Futures.Indices.SP500EMini;
         public Symbol SP500 = QuantConnect.Symbol.Create(RootSP500, SecurityType.Future, Market.USA);
         private HashSet<Symbol> _futureContracts = new HashSet<Symbol>();
+
         public override void Initialize()
         {
-            SetStartDate(2016, 08, 17);
-            SetEndDate(2016, 08, 20);
+            SetStartDate(2013, 10, 8);
+            SetEndDate(2013, 10, 11);
             SetCash(1000000);

             var futureSP500 = AddFuture(RootSP500);
@@ -60,7 +61,6 @@
             }
         }

-
         public void OnDataConsolidated(object sender, QuoteBar quoteBar)
         {
             Log("OnDataConsolidated called");