12345678910111213141516171819202122232425262728293031 |
- using System;
- namespace IFramework
- {
-
-
-
-
- public class ActivatorCreatePool<T> : ObjectPool<T>
- {
- private object[] args;
-
-
-
-
- public ActivatorCreatePool(params object[] args)
- {
- this.args = args;
- }
-
-
-
-
-
- protected override T CreateNew(IEventArgs arg)
- {
- Type type = typeof(T);
- return (T)Activator.CreateInstance(type, args);
- }
- }
- }
|