当前位置: 首页>>代码示例>>C#>>正文


C# IAppDataFolder.Combine方法代码示例

本文整理汇总了C#中IAppDataFolder.Combine方法的典型用法代码示例。如果您正苦于以下问题:C# IAppDataFolder.Combine方法的具体用法?C# IAppDataFolder.Combine怎么用?C# IAppDataFolder.Combine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IAppDataFolder的用法示例。


在下文中一共展示了IAppDataFolder.Combine方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Init

        public void Init() {
            if (Directory.Exists(_basePath)) {
                Directory.Delete(_basePath, true);
            }

            Directory.CreateDirectory(_basePath);
            _appDataFolder = AppDataFolderTests.CreateAppDataFolder(_basePath);
            _webDownloader = new Mock<IWebDownloader>();
            _orchardServices = new StubOrchardServices();
            ((StubWorkContextAccessor.WorkContextImpl.StubSite) _orchardServices.WorkContext.CurrentSite).BaseUrl = "http://orchardproject.net";

            _settings = new WarmupSettingsPart { Record = new WarmupSettingsPartRecord() };
            _orchardServices.WorkContext.CurrentSite.ContentItem.Weld(_settings);
 
            var builder = new ContainerBuilder();
            builder.RegisterInstance(_appDataFolder).As<IAppDataFolder>();
            builder.RegisterInstance(_orchardServices).As<IOrchardServices>();
            builder.RegisterType<DefaultLockFileManager>().As<ILockFileManager>();
            builder.RegisterType<WarmupUpdater>().As<IWarmupUpdater>();
            builder.RegisterType<StubClock>().As<IClock>();
            builder.RegisterType<WarmupReportManager>().As<IWarmupReportManager>();
            builder.RegisterInstance(new ShellSettings { Name = "Default" }).As<ShellSettings>();
            builder.RegisterInstance(_clock = new StubClock()).As<IClock>();
            builder.RegisterInstance(_webDownloader.Object).As<IWebDownloader>();
            _container = builder.Build();

            _lockFileManager = _container.Resolve<ILockFileManager>();
            _warmupUpdater = _container.Resolve<IWarmupUpdater>();
            _reportManager = _container.Resolve<IWarmupReportManager>();

            _warmupFilename = _appDataFolder.Combine(TenantFolder, "warmup.txt");
            _lockFilename = _appDataFolder.Combine(TenantFolder, "warmup.txt.lock");
        }
开发者ID:wezmag,项目名称:Coevery,代码行数:33,代码来源:WarmupUpdaterTests.cs

示例2: WarmupReportManager

        public WarmupReportManager(
            ShellSettings shellSettings,
            IAppDataFolder appDataFolder) {
            _appDataFolder = appDataFolder;

            _warmupReportPath = _appDataFolder.Combine("Sites", _appDataFolder.Combine(shellSettings.Name, WarmupReportFilename));
        }
开发者ID:anycall,项目名称:Orchard,代码行数:7,代码来源:WarmupReportManager.cs

示例3: LastSynchronizedDate

        public LastSynchronizedDate(IAppDataFolder appDataFolder, ShellSettings shellSettings) {
            _appDataFolder = appDataFolder;
            _shellSettings = shellSettings;

            _basePath = _appDataFolder.Combine("Sites", _shellSettings.Name, "Packages");
            CreateBaseDirectoryIfItDoesNotExist();
        }
开发者ID:NickAndersonX,项目名称:xodb,代码行数:7,代码来源:LastSynchronizedDate.cs

示例4: DefaultExtensionDependenciesManager

        public DefaultExtensionDependenciesManager(ICacheManager cacheManager, IAppDataFolder appDataFolder)
        {
            _cacheManager = cacheManager;
            _appDataFolder = appDataFolder;
            _writeThroughToken = new InvalidationToken();

            Logger = NullLogger.Instance;

            _persistencePath = appDataFolder.Combine(BasePath, FileName);
        }
开发者ID:l1183479157,项目名称:RabbitHub,代码行数:10,代码来源:DefaultExtensionDependenciesManager.cs

示例5: WarmupUpdater

        public WarmupUpdater(
            IOrchardServices orchardServices, 
            ILockFileManager lockFileManager,
            IClock clock,
            IAppDataFolder appDataFolder,
            IWebDownloader webDownloader,
            IWarmupReportManager reportManager,
            ShellSettings shellSettings) {
            _orchardServices = orchardServices;
            _lockFileManager = lockFileManager;
            _clock = clock;
            _appDataFolder = appDataFolder;
            _webDownloader = webDownloader;
            _reportManager = reportManager;

            _lockFilename = _appDataFolder.Combine("Sites", _appDataFolder.Combine(shellSettings.Name, WarmupFilename + ".lock"));
            _warmupPath = _appDataFolder.Combine("Sites", _appDataFolder.Combine(shellSettings.Name, WarmupFilename));

            Logger = NullLogger.Instance;
        }
开发者ID:anycall,项目名称:Orchard,代码行数:20,代码来源:WarmupUpdater.cs

示例6: FileSystemOutputCacheBackgroundTask

        public FileSystemOutputCacheBackgroundTask(
            IAppDataFolder appDataFolder, 
            ShellSettings shellSettings,
            ICacheManager cacheManager,
            IClock clock,
            ISignals signals) {
            _appDataFolder = appDataFolder;
            _shellSettings = shellSettings;
            _cacheManager = cacheManager;
            _clock = clock;
            _signals = signals;

            _root = _appDataFolder.Combine("OutputCache", _shellSettings.Name);
        }
开发者ID:RasterImage,项目名称:Orchard,代码行数:14,代码来源:FileSystemOutputCacheBackgroundTask.cs

示例7: LuceneIndexProvider

        public LuceneIndexProvider(IAppDataFolder appDataFolder, ShellSettings shellSettings) {
            _appDataFolder = appDataFolder;
            _analyzer = CreateAnalyzer();

            // TODO: (sebros) Find a common way to get where tenant's specific files should go. "Sites/Tenant" is hard coded in multiple places
            _basePath = _appDataFolder.Combine("Sites", shellSettings.Name, "Indexes");

            Logger = NullLogger.Instance;

            // Ensures the directory exists
            EnsureDirectoryExists();

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
开发者ID:kanujhun,项目名称:orchard,代码行数:15,代码来源:LuceneIndexProvider.cs


注:本文中的IAppDataFolder.Combine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。