Ejemplo n.º 1
0
        //private int _uid;

        internal void RegisterInternal(ref string uid, DisplayListMember component)
        {
            if (null == uid)
            {
                //uid = _uid++.ToString();
                uid = NamingUtil.CreateUid(component); //_uid++.ToString();
            }
            //Debug.Log(uid);

            if (_systemDict.ContainsKey(uid))
            {
#if DEBUG
                if (DebugMode)
                {
                    Debug.Log(string.Format(ComponentManagerException.IdAlreadyRegistered, uid));
                    Debug.Break();
                }
#endif
                return;
                //TODO: Examine this error
                //throw new ComponentManagerException(string.Format(ComponentManagerException.IdAlreadyRegistered, uid));
            }

            _systemDict.Add(uid, component);

#if DEBUG
            if (DebugMode)
            {
                Debug.Log(string.Format(@"Component registered [INTERNAL]: [{0}] => {1}", uid, component));
            }
#endif
        }