本文整理汇总了C#中Area.RecordChanges方法的典型用法代码示例。如果您正苦于以下问题:C# Area.RecordChanges方法的具体用法?C# Area.RecordChanges怎么用?C# Area.RecordChanges使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Area
的用法示例。
在下文中一共展示了Area.RecordChanges方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunInternal
protected override bool RunInternal(Area ws, Versionr.Status status, IList<Versionr.Status.StatusEntry> targets, FileBaseCommandVerbOptions options)
{
CommitVerbOptions localOptions = options as CommitVerbOptions;
if (localOptions.Message == null && localOptions.MessageFile == null)
{
Printer.PrintError("#x#Error:## A commit message must be specified with the --message or --message-file options.");
return false;
}
if (targets != null && targets.Count > 0)
{
ws.RecordChanges(status, targets, localOptions.Missing, false, RecordFeedback);
}
string message = localOptions.Message;
if (localOptions.MessageFile != null)
{
using (var fs = System.IO.File.OpenText(localOptions.MessageFile))
{
message = fs.ReadToEnd();
}
}
else
{
message = message.Replace("\\\"", "\"");
message = message.Replace("\\n", "\n");
message = message.Replace("\\t", "\t");
}
if (!ws.Commit(message, localOptions.Force))
return false;
return true;
}
示例2: RunInternal
protected override bool RunInternal(Area ws, Versionr.Status status, IList<Versionr.Status.StatusEntry> targets, FileBaseCommandVerbOptions options)
{
RecordVerbOptions localOptions = options as RecordVerbOptions;
return ws.RecordChanges(status, targets, localOptions.Missing, localOptions.Interactive, new Action<Versionr.Status.StatusEntry, StatusCode, bool>(RecordFeedback));
}