public void RemoveOnCreatedDelegate(string poolName, OnCreatedDelegate createdDelegate) { if (mOnCreatedDelegates.ContainsKey(poolName)) { mOnCreatedDelegates[poolName] -= createdDelegate; } }
public void AddOnCreatedDelegate(string poolName, OnCreatedDelegate createdDelegate) { if (!mOnCreatedDelegates.ContainsKey(poolName)) { mOnCreatedDelegates.Add(poolName, createdDelegate); return; } mOnCreatedDelegates[poolName] += createdDelegate; }
public void RemoveOnCreatedDelegate(string poolName, OnCreatedDelegate createdDelegate) { if (!this.onCreatedDelegates.ContainsKey(poolName)) { LitLogger.WarningFormat("No OnCreatedDelegates found for pool name: <{0}>", poolName); return; } this.onCreatedDelegates[poolName] -= createdDelegate; }
public void AddOnCreatedDelegate(string poolName, OnCreatedDelegate createdDelegate) { // Assign first delegate "just in time" if (!this.onCreatedDelegates.ContainsKey(poolName)) { this.onCreatedDelegates.Add(poolName, createdDelegate); return; } this.onCreatedDelegates[poolName] += createdDelegate; }
public void AddOnCreatedDelegate(string poolName, OnCreatedDelegate createdDelegate) { // 第一次添加poolName关键字时执行 if (!this.onCreatedDelegates.ContainsKey(poolName)) { this.onCreatedDelegates.Add(poolName, createdDelegate); return; } this.onCreatedDelegates[poolName] += createdDelegate; }
public void RemoveOnCreatedDelegate(string poolName, OnCreatedDelegate createdDelegate) { if (!this.onCreatedDelegates.ContainsKey(poolName)) { throw new KeyNotFoundException ( "No OnCreatedDelegates found for pool name '" + poolName + "'." ); } this.onCreatedDelegates[poolName] -= createdDelegate; }
/** 移除监听创建PoolGroup */ public void RemoveOnCreatedDelegate(string groupName, OnCreatedDelegate createdDelegate) { if (!this.onCreatedDelegates.ContainsKey(groupName)) { throw new KeyNotFoundException ( "No OnCreatedDelegates found for PoolGroup name '" + groupName + "'." ); } this.onCreatedDelegates[groupName] -= createdDelegate; }
public void RemoveOnCreatedDelegate(string poolName, OnCreatedDelegate createdDelegate) { if (!this.onCreatedDelegates.ContainsKey(poolName)) throw new KeyNotFoundException ( "No OnCreatedDelegates found for pool name '" + poolName + "'." ); this.onCreatedDelegates[poolName] -= createdDelegate; Debug.Log(string.Format( "Removed onCreatedDelegates for pool '{0}': {1}", poolName, createdDelegate.Target) ); }
public void AddOnCreatedDelegate(string poolName, OnCreatedDelegate createdDelegate) { // Assign first delegate "just in time" if (!this.onCreatedDelegates.ContainsKey(poolName)) { this.onCreatedDelegates.Add(poolName, createdDelegate); Debug.Log(string.Format( "Added onCreatedDelegates for pool '{0}': {1}", poolName, createdDelegate.Target) ); return; } this.onCreatedDelegates[poolName] += createdDelegate; }