示例#1
0
        /// <summary>
        /// <![CDATA[
        ///   Looks for all implementations of IEventSubscriber<>
        ///   then adds each implementation to be returned when calling with a specific generic.
        ///   This is to support returning things such as all implementations of: IEventSubscriber<SomeEvent>
        /// ]]>
        /// </summary>
        void registerAllGenericImplementationsFor(Type genericType)
        {
            var reflectionUtils = new ReflectionUtils();
            var implementingTypes = reflectionUtils.GetTypesImplementingGenericType(genericType, typeof(HarborApp).Assembly);

            foreach (var type in implementingTypes)
            {
                // AsImplementedInterfaces
                foreach (var implementedInterface in type.GetInterfaces())
                {
                    For(implementedInterface).Add(type);
                }
            }
        }
示例#2
0
 void Awake()
 {
     m_ReflectionUtils = new ReflectionUtils<Recorder>(this);
     m_Frames = new Queue<RenderTexture>();
     Init();
 }