public void pushSocialInfo(int nClassify, int nSocialId, SocialInfo nSocialInfo) { if (!mSocialStates.ContainsKey(nClassify)) { SocialState socialState_ = new SocialState(); mSocialStates[nClassify] = socialState_; } mSocialStates[nClassify].pushSocialInfo(nSocialId, nSocialInfo); }
public static void initSocial(bool nReinit) { if (!nReinit) { if (mInitSocialed) { return; } } SqlConnection sqlConnection_ = new SqlConnection(); sqlConnection_.ConnectionString = ConstAspect.mConnectionString; sqlConnection_.Open(); SqlCommand sqlCommand_ = new SqlCommand(); sqlCommand_.Connection = sqlConnection_; sqlCommand_.CommandType = CommandType.Text; sqlCommand_.CommandText = mInitSocial; SqlDataReader sqlDataReader_ = sqlCommand_.ExecuteReader(); while (sqlDataReader_.Read()) { SocialInfo gameInfo_ = new SocialInfo(); string gameName_ = sqlDataReader_.GetString(0).Trim(); int gameId_ = sqlDataReader_.GetInt32(1); int classify_ = sqlDataReader_.GetInt16(2); gameInfo_.mSocialIp = sqlDataReader_.GetString(3).Trim(); gameInfo_.mSocialPort = sqlDataReader_.GetString(4).Trim(); if (!mGameStates.ContainsKey(gameName_)) { SocialClassify gameState_ = new SocialClassify(); mGameStates[gameName_] = gameState_; } mGameStates[gameName_].pushSocialInfo(classify_, gameId_, gameInfo_); } sqlDataReader_.Close(); sqlConnection_.Close(); mInitSocialed = true; }
public void pushSocialInfo(int nSocialId, SocialInfo nSocialInfo) { mSocialInfos[nSocialId] = nSocialInfo; }