本文整理汇总了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");
}
示例2: WarmupReportManager
public WarmupReportManager(
ShellSettings shellSettings,
IAppDataFolder appDataFolder) {
_appDataFolder = appDataFolder;
_warmupReportPath = _appDataFolder.Combine("Sites", _appDataFolder.Combine(shellSettings.Name, WarmupReportFilename));
}
示例3: LastSynchronizedDate
public LastSynchronizedDate(IAppDataFolder appDataFolder, ShellSettings shellSettings) {
_appDataFolder = appDataFolder;
_shellSettings = shellSettings;
_basePath = _appDataFolder.Combine("Sites", _shellSettings.Name, "Packages");
CreateBaseDirectoryIfItDoesNotExist();
}
示例4: DefaultExtensionDependenciesManager
public DefaultExtensionDependenciesManager(ICacheManager cacheManager, IAppDataFolder appDataFolder)
{
_cacheManager = cacheManager;
_appDataFolder = appDataFolder;
_writeThroughToken = new InvalidationToken();
Logger = NullLogger.Instance;
_persistencePath = appDataFolder.Combine(BasePath, FileName);
}
示例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;
}
示例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);
}
示例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;
}