CompositeNode1.FirstChild
CompositeNode<T>.FirstChild property
获取此节点的第一个子节点。
public T FirstChild { get; }
示例
展示如何检查页面是否为冲突页面(即它包含 OneNote 无法自动合并的更改)。
string dataDir = RunExamples.GetDataDir_Pages();
// 加载 OneNote 文档
Document doc = new Document(dataDir + "Aspose.one", new LoadOptions { LoadHistory = true });
var history = doc.GetPageHistory(doc.FirstChild);
for (int i = 0; i < history.Count; i++)
{
var historyPage = history[i];
Console.Write(" {0}. Author: {1}, {2:dd.MM.yyyy hh.mm.ss}",
i,
historyPage.PageContentRevisionSummary.AuthorMostRecent,
historyPage.PageContentRevisionSummary.LastModifiedTime);
Console.WriteLine(historyPage.IsConflictPage ? ", IsConflict: true" : string.Empty);
// 默认情况下,冲突页面在保存时会被跳过。
// 如果将其标记为非冲突,则它将在历史记录中像普通页面一样保存。
if (historyPage.IsConflictPage)
historyPage.IsConflictPage = false;
}
doc.Save(dataDir + "ConflictPageManipulation_out.one", SaveFormat.One);
另请参阅
- class CompositeNode<T>
- namespace Aspose.Note
- assembly Aspose.Note