예제 #1
0
        public void RemoveOnCreatedDelegate(string poolName, SpawnPoolsDict.OnCreatedDelegate createdDelegate)
        {
            if (!this.onCreatedDelegates.ContainsKey(poolName))
            {
                throw new KeyNotFoundException("No OnCreatedDelegates found for pool name '" + poolName + "'.");
            }
            Dictionary <string, SpawnPoolsDict.OnCreatedDelegate> dictionary;
            Dictionary <string, SpawnPoolsDict.OnCreatedDelegate> expr_2D = dictionary = this.onCreatedDelegates;

            SpawnPoolsDict.OnCreatedDelegate source = dictionary[poolName];
            expr_2D[poolName] = (SpawnPoolsDict.OnCreatedDelegate)Delegate.Remove(source, createdDelegate);
        }
예제 #2
0
        public void AddOnCreatedDelegate(string poolName, SpawnPoolsDict.OnCreatedDelegate createdDelegate)
        {
            if (!this.onCreatedDelegates.ContainsKey(poolName))
            {
                this.onCreatedDelegates.Add(poolName, createdDelegate);
                return;
            }
            Dictionary <string, SpawnPoolsDict.OnCreatedDelegate> dictionary;
            Dictionary <string, SpawnPoolsDict.OnCreatedDelegate> expr_25 = dictionary = this.onCreatedDelegates;

            SpawnPoolsDict.OnCreatedDelegate a = dictionary[poolName];
            expr_25[poolName] = (SpawnPoolsDict.OnCreatedDelegate)Delegate.Combine(a, createdDelegate);
        }