當前位置: 首頁>>代碼示例>>C#>>正文


C# Solution.UseCache方法代碼示例

本文整理匯總了C#中ripple.Model.Solution.UseCache方法的典型用法代碼示例。如果您正苦於以下問題:C# Solution.UseCache方法的具體用法?C# Solution.UseCache怎麽用?C# Solution.UseCache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ripple.Model.Solution的用法示例。


在下文中一共展示了Solution.UseCache方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SetUp

        public void SetUp()
        {
            theCacheFeed = new Feed("file://cache");
            theFileSystemFeed = new Feed("file://feed");

            FeedScenario.Create(scenario =>
            {
                scenario.For(theCacheFeed)
                        .Add("Dependency1", "1.0.0.0");

                scenario.For(theFileSystemFeed)
                        .Add("Dependency1", "1.1.0.0");

                scenario.For(Feed.NuGetV2)
                        .Add("Dependency1", "1.0.23.0");
            });

            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.SolutionDependency("Dependency1", "1.1.0.0", UpdateMode.Float);
                });
            });

            theSolution = theScenario.Find("Test");
            theSolution.ClearFeeds();
            theSolution.AddFeed(theFileSystemFeed);
            theSolution.AddFeed(Feed.NuGetV2);

            theSolution.UseCache(new InMemoryNugetCache(theCacheFeed));
        }
開發者ID:johnsimons,項目名稱:ripple,代碼行數:32,代碼來源:feed_order_with_cache.cs

示例2: SetUp

        public void SetUp()
        {
            theScenario = SolutionScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    // Defacto a float
                    test.ProjectDependency("Test", "Spark");
                });
            });

            theCache = new Feed("cache");

            theSolution = theScenario.Find("Test");
            theSolution.UseCache(new InMemoryNugetCache(theCache));

            FeedScenario.Create(scenario =>
            {
                scenario.For(theCache)
                    .Add("Spark", "1.0.0.0");

                scenario.For(Feed.NuGetV2)
                    .Add("Spark", "1.1.0.1");
            });

            RippleOperation
                .With(theSolution)
                .Execute<RestoreInput, RestoreCommand>();
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:29,代碼來源:restore_float_dependency_with_no_version.cs

示例3: SetUp

        public void SetUp()
        {
            theScenario = SolutionGraphScenario.Create(scenario =>
            {
                scenario.Solution("Test", test =>
                {
                    test.SolutionDependency("TestNuGet", "1.1.0.1", UpdateMode.Float);
                    test.ProjectDependency("Test", "TestNuGet");
                });
            });

            theCache = new Feed("cache");

            theSolution = theScenario.Find("Test");
            theSolution.UseCache(new InMemoryNugetCache(theCache));

            FeedScenario.Create(scenario =>
            {
                scenario.For(theCache)
                        .Add("TestNuGet", "1.1.0.1");
            });

            RippleOperation
                .With(theSolution)
                .Execute<RestoreInput, RestoreCommand>();
        }
開發者ID:kjnilsson,項目名稱:ripple,代碼行數:26,代碼來源:restore_dependencies_that_only_exist_in_cache.cs

示例4: Apply

        public void Apply(Solution solution)
        {
            RippleLog.Verbose(VerboseFlag);

            if (CacheFlag.IsNotEmpty())
            {
                solution.UseCache(new NugetFolderCache(solution, CacheFlag.ToFullPath()));
            }

            ApplyTo(solution);
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:11,代碼來源:RippleInput.cs

示例5: SetUp

        public void SetUp()
        {
            theFinder = new CacheFinder();
            theCache = new Feed("cache");

            FeedScenario.Create(scenario =>
            {
                scenario.For(theCache)
                    .Add("Test", "1.1.0.0");
            });

            theSolution = Solution.Empty();
            theSolution.UseCache(new InMemoryNugetCache(theCache));
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:14,代碼來源:CacheFinderTester.cs

示例6: SetUp

        public void SetUp()
        {
            theSolution = Solution.Empty();
            
            theCacheFeed = new Feed("cache");
            theFeed = new Feed("test");

            theSolution.AddFeed(theFeed);
            theSolution.UseCache(new InMemoryNugetCache(theCacheFeed));

            FeedScenario.Create(scenario =>
            {
                scenario.For(theFeed);
                scenario.For(theCacheFeed);
            });

            theConnectivity = new FeedConnectivity();
        }
開發者ID:modulexcite,項目名稱:ripple,代碼行數:18,代碼來源:FeedConnectivityTester.cs


注:本文中的ripple.Model.Solution.UseCache方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。