本文整理汇总了C#中Nexus.Client.Util.FileUtil类的典型用法代码示例。如果您正苦于以下问题:C# FileUtil类的具体用法?C# FileUtil怎么用?C# FileUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FileUtil类属于Nexus.Client.Util命名空间,在下文中一共展示了FileUtil类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NexusModCacheManager
/// <summary>
/// A simple constructor that initializes the object with the given dependencies.
/// </summary>
/// <param name="p_strModCacheDirectory">The path of the directory where the current Game Mode's mods' cache files are stored.</param>
/// <param name="p_strModDirectory">The path of the directory where the current Game Mode's mod files are stored.</param>
/// <param name="p_futFileUtility">The file utility class.</param>
public NexusModCacheManager(string p_strModCacheDirectory, string p_strModDirectory, FileUtil p_futFileUtility)
{
ModCacheDirectory = p_strModCacheDirectory;
ModDirectory = p_strModDirectory;
FileUtility = p_futFileUtility;
CheckModCache();
}
示例2: Initialize
/// <summary>
/// Initializes the singleton intances of the mod manager.
/// </summary>
/// <param name="p_gmdGameMode">The current game mode.</param>
/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
/// <param name="p_mrpModRepository">The mod repository from which to get mods and mod metadata.</param>
/// <param name="p_dmrMonitor">The download monitor to use to track task progress.</param>
/// <param name="p_frgFormatRegistry">The <see cref="IModFormatRegistry"/> that contains the list
/// of supported <see cref="IModFormat"/>s.</param>
/// <param name="p_mrgModRegistry">The <see cref="ModRegistry"/> that contains the list
/// of managed <see cref="IMod"/>s.</param>
/// <param name="p_futFileUtility">The file utility class.</param>
/// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
/// <param name="p_ilgInstallLog">The install log tracking mod activations for the current game mode.</param>
/// <param name="p_pmgPluginManager">The plugin manager to use to work with plugins.</param>
/// <returns>The initialized mod manager.</returns>
/// <exception cref="InvalidOperationException">Thrown if the mod manager has already
/// been initialized.</exception>
public static ModManager Initialize(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IModRepository p_mrpModRepository, DownloadMonitor p_dmrMonitor, ActivateModsMonitor p_ammMonitor, IModFormatRegistry p_frgFormatRegistry, ModRegistry p_mrgModRegistry, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager)
{
if (m_mmgCurrent != null)
throw new InvalidOperationException("The Mod Manager has already been initialized.");
m_mmgCurrent = new ModManager(p_gmdGameMode, p_eifEnvironmentInfo, p_mrpModRepository, p_dmrMonitor, p_ammMonitor, p_frgFormatRegistry, p_mrgModRegistry, p_futFileUtility, p_scxUIContext, p_ilgInstallLog, p_pmgPluginManager);
return m_mmgCurrent;
}
示例3: ModBuilder
/// <summary>
/// A simple construtor that initializes the object with the reqruied dependencies.
/// </summary>
/// <param name="p_gmiGameModeInfo">The environment info of the current game mode.</param>
/// <param name="p_futFileUtility">The file utility class.</param>
/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
public ModBuilder(IGameModeEnvironmentInfo p_gmiGameModeInfo, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility)
{
GameModeInfo = p_gmiGameModeInfo;
EnvironmentInfo = p_eifEnvironmentInfo;
FileUtility = p_futFileUtility;
OverallProgressMaximum = 4;
}
示例4: ModInstallerFactory
/// <summary>
/// A simple constructor that initializes the factory with the required dependencies.
/// </summary>
/// <param name="p_gmdGameMode">The game mode for which the created installer will be installing mods.</param>
/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
/// <param name="p_futFileUtility">The file utility class.</param>
/// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
/// <param name="p_ilgInstallLog">The install log that tracks mod install info
/// for the current game mode.</param>
/// <param name="p_pmgPluginManager">The plugin manager to use to work with plugins.</param>
public ModInstallerFactory(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager, ModManager p_mmModManager)
{
m_gmdGameMode = p_gmdGameMode;
m_eifEnvironmentInfo = p_eifEnvironmentInfo;
m_futFileUtility = p_futFileUtility;
m_scxUIContext = p_scxUIContext;
m_ilgInstallLog = p_ilgInstallLog;
m_pmgPluginManager = p_pmgPluginManager;
m_mmModManager = p_mmModManager;
}
示例5: ModPackager
/// <summary>
/// A simple constructor that initializes the object with its dependencies.
/// </summary>
/// <param name="p_futFileUtilities">The file utility class.</param>
public ModPackager(FileUtil p_futFileUtilities)
{
FileUtilities = p_futFileUtilities;
}
示例6: PrepareModTask
/// <summary>
/// A simple constructor that initializes the object with the given values.
/// </summary>
/// <param name="p_futFileUtility">The file utility class.</param>
public PrepareModTask(FileUtil p_futFileUtility)
{
FileUtility = p_futFileUtility;
}
示例7: GetGameSpecificValueUpgradeInstaller
/// <summary>
/// Gets the installer to use to upgrade game specific values.
/// </summary>
/// <param name="p_modMod">The mod being upgraded.</param>
/// <param name="p_ilgInstallLog">The install log to use to log the installation of the game specific values.</param>
/// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param>
/// <returns>The installer to use to manage game specific values, or <c>null</c> if the game mode does not
/// install any game specific values.</returns>
/// <param name="p_futFileUtility">The file utility class.</param>
/// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param>
public override IGameSpecificValueInstaller GetGameSpecificValueUpgradeInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate)
{
return new GamebryoGameSpecificValueInstaller(p_modMod, GameModeEnvironmentInfo, p_ilgInstallLog, p_tfmFileManager, p_futFileUtility, p_dlgOverwriteConfirmationDelegate);
}
示例8: GamebryoGameModeBase
/// <summary>
/// A simple constructor that initializes the object with the given values.
/// </summary>
/// <param name="p_eifEnvironmentInfo">The application's environment info.</param>
/// <param name="p_futFileUtility">The file utility class to be used by the game mode.</param>
public GamebryoGameModeBase(IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility)
: base(p_eifEnvironmentInfo)
{
SettingsFiles = CreateSettingsFileContainer();
SetupSettingsFiles();
SettingsGroupViews = new List<ISettingsGroupView>();
GeneralSettingsGroup gsgGeneralSettings = new GeneralSettingsGroup(p_eifEnvironmentInfo, this);
((List<ISettingsGroupView>)SettingsGroupViews).Add(new GeneralSettingsPage(gsgGeneralSettings));
SetupPluginManagement(p_futFileUtility);
}
示例9: InstantiateGameMode
/// <summary>
/// Instantiates the game mode.
/// </summary>
/// <param name="p_futFileUtility">The file utility class to be used by the game mode.</param>
/// <returns>The game mode for which this is a factory.</returns>
protected GrimrockGameMode InstantiateGameMode(FileUtil p_futFileUtility)
{
return new GrimrockGameMode(EnvironmentInfo, p_futFileUtility);
}
示例10: GetGameSpecificValueInstaller
/// <summary>
/// Gets the installer to use to install game specific values.
/// </summary>
/// <param name="p_modMod">The mod being installed.</param>
/// <param name="p_ilgInstallLog">The install log to use to log the installation of the game specific values.</param>
/// <param name="p_tfmFileManager">The transactional file manager to use to interact with the file system.</param>
/// <returns>The installer to use to manage game specific values, or <c>null</c> if the game mode does not
/// install any game specific values.</returns>
/// <param name="p_futFileUtility">The file utility class.</param>
/// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param>
public override IGameSpecificValueInstaller GetGameSpecificValueInstaller(IMod p_modMod, IInstallLog p_ilgInstallLog, TxFileManager p_tfmFileManager, FileUtil p_futFileUtility, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate)
{
return null;
}
示例11: InstantiateGameMode
/// <summary>
/// Instantiates the game mode.
/// </summary>
/// <param name="p_futFileUtility">The file utility class to be used by the game mode.</param>
/// <returns>The game mode for which this is a factory.</returns>
protected DarkSouls2GameMode InstantiateGameMode(FileUtil p_futFileUtility)
{
return new DarkSouls2GameMode(EnvironmentInfo, p_futFileUtility);
}
示例12: InstantiateGameMode
/// <summary>
/// Instantiates the game mode.
/// </summary>
/// <param name="p_futFileUtility">The file utility class to be used by the game mode.</param>
/// <returns>The game mode for which this is a factory.</returns>
protected Witcher2GameMode InstantiateGameMode(FileUtil p_futFileUtility)
{
return new Witcher2GameMode(EnvironmentInfo, p_futFileUtility);
}
示例13: ModInstaller
/// <summary>
/// A simple constructor that initializes the object with the given values.
/// </summary>
/// <param name="p_modMod">The mod being installed.</param>
/// <param name="p_gmdGameMode">The current game mode.</param>
/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
/// <param name="p_futFileUtility">The file utility class.</param>
/// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
/// <param name="p_ilgModInstallLog">The install log that tracks mod install info
/// for the current game mode</param>
/// <param name="p_pmgPluginManager">The plugin manager.</param>
/// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param>
/// <param name="p_rolActiveMods">The list of active mods.</param>
public ModInstaller(IMod p_modMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgModInstallLog, IPluginManager p_pmgPluginManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate, ReadOnlyObservableList<IMod> p_rolActiveMods, ModManager p_mmModManager)
{
Mod = p_modMod;
GameMode = p_gmdGameMode;
EnvironmentInfo = p_eifEnvironmentInfo;
FileUtility = p_futFileUtility;
UIContext = p_scxUIContext;
ModInstallLog = p_ilgModInstallLog;
PluginManager = p_pmgPluginManager;
m_dlgOverwriteConfirmationDelegate = p_dlgOverwriteConfirmationDelegate;
ActiveMods = p_rolActiveMods;
m_mmModManager = p_mmModManager;
}
示例14: ModManager
/// <summary>
/// A simple constructor that initializes the object with its dependencies.
/// </summary>
/// <param name="p_gmdGameMode">The current game mode.</param>
/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
/// <param name="p_mrpModRepository">The mod repository from which to get mods and mod metadata.</param>
/// <param name="p_dmrMonitor">The download monitor to use to track task progress.</param>
/// <param name="p_frgFormatRegistry">The <see cref="IModFormatRegistry"/> that contains the list
/// of supported <see cref="IModFormat"/>s.</param>
/// <param name="p_mdrManagedModRegistry">The <see cref="ModRegistry"/> that contains the list
/// of managed <see cref="IMod"/>s.</param>
/// <param name="p_futFileUtility">The file utility class.</param>
/// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
/// <param name="p_ilgInstallLog">The install log tracking mod activations for the current game mode.</param>
/// <param name="p_pmgPluginManager">The plugin manager to use to work with plugins.</param>
private ModManager(IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, IModRepository p_mrpModRepository, DownloadMonitor p_dmrMonitor, ActivateModsMonitor p_ammMonitor, IModFormatRegistry p_frgFormatRegistry, ModRegistry p_mdrManagedModRegistry, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgInstallLog, IPluginManager p_pmgPluginManager)
{
GameMode = p_gmdGameMode;
EnvironmentInfo = p_eifEnvironmentInfo;
m_rmmReadMeManager = new ReadMeManager(EnvironmentInfo.Settings.ModFolder[GameMode.ModeId]);
ModRepository = p_mrpModRepository;
FormatRegistry = p_frgFormatRegistry;
ManagedModRegistry = p_mdrManagedModRegistry;
InstallationLog = p_ilgInstallLog;
InstallerFactory = new ModInstallerFactory(p_gmdGameMode, p_eifEnvironmentInfo, p_futFileUtility, p_scxUIContext, p_ilgInstallLog, p_pmgPluginManager, this);
DownloadMonitor = p_dmrMonitor;
ActivateModsMonitor = p_ammMonitor;
ModAdditionQueue = new AddModQueue(p_eifEnvironmentInfo, this);
AutoUpdater = new AutoUpdater(p_mrpModRepository, p_mdrManagedModRegistry, p_eifEnvironmentInfo);
LoginTask = new LoginFormTask(this);
}
示例15: ModUpgrader
/// <summary>
/// A simple constructor that initializes the object with the given values.
/// </summary>
/// <param name="p_modOldMod">The mod from which to upgrade.</param>
/// <param name="p_modNewMod">The mod to which to upgrade.</param>
/// <param name="p_gmdGameMode">The current game mode.</param>
/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
/// <param name="p_futFileUtility">The file utility class.</param>
/// <param name="p_scxUIContext">The <see cref="SynchronizationContext"/> to use to marshall UI interactions to the UI thread.</param>
/// <param name="p_ilgModInstallLog">The install log that tracks mod install info
/// for the current game mode</param>
/// <param name="p_pmgPluginManager">The plugin manager.</param>
/// <param name="p_dlgOverwriteConfirmationDelegate">The method to call in order to confirm an overwrite.</param>
public ModUpgrader(IMod p_modOldMod, IMod p_modNewMod, IGameMode p_gmdGameMode, IEnvironmentInfo p_eifEnvironmentInfo, FileUtil p_futFileUtility, SynchronizationContext p_scxUIContext, IInstallLog p_ilgModInstallLog, IPluginManager p_pmgPluginManager, ConfirmItemOverwriteDelegate p_dlgOverwriteConfirmationDelegate)
: base(p_modNewMod, p_gmdGameMode, p_eifEnvironmentInfo, p_futFileUtility, p_scxUIContext, p_ilgModInstallLog, p_pmgPluginManager, p_dlgOverwriteConfirmationDelegate, null, null)
{
OldMod = p_modOldMod;
}