Ejemplo n.º 1
0
        private void EntityComponentRequested(object sender, ComponentRequestEventArgs e)
        {
            MethodInfo method = cacheManager.GetType().GetMethod(nameof(CacheManager.GetItemFromCache));

            method = method.MakeGenericMethod(e.RequestedType);
            e.SetComponent((IComponent)method.Invoke(cacheManager, Array.Empty <object>()));
        }