示例#1
0
        public void AddBufferCreatorsInAssembly(Assembly asm)
        {
            Type[] ts = asm.GetExportedTypes();

            Type target = typeof(ASerializableBufferCreator);

            for (int i = 0; i < ts.Length; i++)
            {
                if (target != ts[i] && target.IsAssignableFrom(ts[i]))
                {
                    ASerializableBufferCreator bc = (ASerializableBufferCreator) Activator.CreateInstance(ts[i]);
                    AddBufferCreator(bc);
                }
            }
        }
示例#2
0
 public void AddBufferCreator(ASerializableBufferCreator bufferCreator)
 {
     bufferCreators.Add(bufferCreator);
 }