コード例 #1
0
 public void Should_throw_exception_if_syntax_invalid()
 {
     Assert.Throws <InvalidDataException>(
         () => YamlCacheProfileProvider.ReadYamlData(new List <string> {
         "\tKeyWithoutValue"
     }));
 }
コード例 #2
0
ファイル: Global.cs プロジェクト: vanthoainguyen/Flatwhite
        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"));
        }
コード例 #3
0
        internal static void Init()
        {
            Cache = new MethodInfoCache();

            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"));
        }