Ejemplo n.º 1
0
        static Global()
        {
            Cache = new MethodInfoCache();

            ContextProvider = new EmptyContextProvider();
            CacheStrategyProvider = new DefaultCacheStrategyProvider();
            AttributeProvider = new DefaulAttributeProvider();
            HashCodeGeneratorProvider = new DefaultHashCodeGeneratorProvider();
            CacheKeyProvider = new DefaultCacheKeyProvider(HashCodeGeneratorProvider);
            CacheStoreProvider = new DefaultCacheStoreProvider();
            ServiceActivator = new ServiceActivator();
            Logger = new NullLogger();
        }
Ejemplo n.º 2
0
        internal static void Init()
        {
            Cache = new MethodInfoCache();

            ContextProvider = new EmptyContextProvider();
            CacheStrategyProvider = new DefaultCacheStrategyProvider();
            AttributeProvider = new DefaulAttributeProvider();
            HashCodeGeneratorProvider = new DefaultHashCodeGeneratorProvider();
            CacheKeyProvider = new DefaultCacheKeyProvider(HashCodeGeneratorProvider);
            CacheStoreProvider = new DefaultCacheStoreProvider();
            ServiceActivator = new DefaultServiceActivator();
            Logger = new NullLogger();
            BackgroundTaskManager = new DefaultBackgroundTaskManager();

            var configFolder = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
            CacheProfileProvider = new YamlCacheProfileProvider(Path.Combine(configFolder ?? "", "cacheProfile.yaml"));
        }