public void SetPointerFromObject(ConsoleObjectBase pObj)
        {
            ObjectPtr = pObj.ObjectPtr;

            if (this is ISimObject sim && !SimDictionary.Contains(sim))
            {
                SimDictionary.RegisterObject(sim);
            }
        }
        public static bool operator ==(ConsoleObjectBase obj, object other)
        {
            if (ReferenceEquals(other, null))
            {
                return(ReferenceEquals(obj, null));
            }
            if (ReferenceEquals(obj, null))
            {
                return(false);
            }
            if (other is string str)
            {
                return(obj.Name == str || obj.GetId().ToString().Equals(str));
            }

            ConsoleObjectBase sobj = other as ConsoleObjectBase;

            if (sobj != null)
            {
                return(obj.ObjectPtr == sobj.ObjectPtr);
            }
            return(obj.Equals(other));
        }
 public ConsoleObjectBase(ConsoleObjectBase pObj)
 {
     SetPointerFromObject(pObj);
 }