本文整理汇总了C#中IMod.BeginReadOnlyTransaction方法的典型用法代码示例。如果您正苦于以下问题:C# IMod.BeginReadOnlyTransaction方法的具体用法?C# IMod.BeginReadOnlyTransaction怎么用?C# IMod.BeginReadOnlyTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMod
的用法示例。
在下文中一共展示了IMod.BeginReadOnlyTransaction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrepareMod
/// <summary>
/// Prepares the given mod for installation.
/// </summary>
/// <remarks>
/// This task puts the mod into read-only mode.
/// </remarks>
/// <returns><c>true</c> if the mod was successfully prepared;
/// <c>false</c> otherwise.</returns>
/// <param name="p_modMod">The mod to prepare.</param>
public bool PrepareMod(IMod p_modMod)
{
OverallMessage = "Preparing Mod...";
ShowItemProgress = false;
OverallProgressMaximum = 100;
OverallProgressStepSize = 1;
try
{
p_modMod.ReadOnlyInitProgressUpdated += new CancelProgressEventHandler(Mod_ReadOnlyInitProgressUpdated);
p_modMod.BeginReadOnlyTransaction(FileUtility);
}
catch (Exception)
{
Status = TaskStatus.Error;
OnTaskEnded(false);
throw;
}
finally
{
p_modMod.ReadOnlyInitProgressUpdated -= Mod_ReadOnlyInitProgressUpdated;
}
bool booSuccess = Status != TaskStatus.Cancelling;
Status = Status == TaskStatus.Cancelling ? TaskStatus.Cancelled : TaskStatus.Complete;
OnTaskEnded(booSuccess);
return booSuccess;
}