Exemple #1
0
 private static void GameNetworkManager_onStartGlobal()
 {
     for (Int32 i = 0; i < hashedObjects.Count; ++i)
     {
         HashedObject cur = hashedObjects[i];
         cur.Register();
     }
 }
Exemple #2
0
        }//method

        #endregion

        public T LookupDbObject <T>(HashedObject key, bool throwNotFound = false) where T : DbModelObjectBase
        {
            DbModelObjectBase result;

            _allObjects.TryGetValue(key, out result);
            if (result == null && throwNotFound)
            {
                Util.Throw("Failed to lookup DbObject for entity model object {0}", key);
            }
            return((T)result);
        }
Exemple #3
0
 public void RegisterDbObject(HashedObject entityModelObject, DbModelObjectBase dbObject)
 {
     if (entityModelObject == null)
     {
         return;
     }
     if (dbObject.ObjectType == DbObjectType.Column)
     {
         return; // do not register columns, there are too many of them, and columns are not real standalone objects
     }
     _allObjects[entityModelObject] = dbObject;
 }//method
Exemple #4
0
        }                                            //used for recording DBModel change scripts in the database

        public DbModelObjectBase(DbModel dbModel, string schema, DbObjectType objectType, HashedObject entityModelObject = null)
        {
            DbModel    = dbModel;
            Schema     = GlobalName = schema;
            ObjectType = objectType;
            if (DbModel != null && entityModelObject != null)
            {
                DbModel.RegisterDbObject(entityModelObject, this);
            }
        }