Class CompositeNode
Именује се: Aspose.Note Асамблеја: Aspose.Note.dll (25.4.0)
Основни генерички клас за чворове који могу да садрже друге.
public abstract class CompositeNode<t> : CompositeNodeBase, INode, ICompositeNode<t>, ICompositeNode, IEnumerable<t>, IEnumerable where T : INode
Типови параметара
T
Тип елемената у композитном чвору.
Inheritance
object
←
Node
←
CompositeNodeBase
←
CompositeNode
Implements
INode
,
ICompositeNode
Наслеђени чланови
CompositeNodeBase.GetChildNodes(NodeType)
,
CompositeNodeBase.GetChildNodes
Constructors
CompositeNode(NodeType)
Иницијалише нову инстанцију Aspose.Note.CompositeNode`1 класе.
protected CompositeNode(NodeType nodeType)
Parameters
nodeType
NodeType
То је врста нода.
Properties
FirstChild
Добије први дечији чвор овог чвора.
public T FirstChild { get; }
Вредност имовине
T
Examples
Показује како да проверите да ли је страница конфликтна страница (тј. има промене које OneNote није могао аутоматски спојити).
string dataDir = RunExamples.GetDataDir_Pages();
// Load OneNote document
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);
// By default conflict pages are just skipped on saving.
// If mark it as non-conflict then it will be saved as usual one in the history.
if (historyPage.IsConflictPage)
historyPage.IsConflictPage = false;
}
doc.Save(dataDir + "ConflictPageManipulation_out.one", SaveFormat.One);
IsComposite
Проверите да ли је чвор композитан. ако је истинито, онда може да има дечије чворове.
public override sealed bool IsComposite { get; }
Вредност имовине
LastChild
Добије последњи дечији чвор овог чвора.
public T LastChild { get; }
Вредност имовине
T
Methods
Accept(DocumentVisitor)
Прихвата посетиоца у чвору.
public override void Accept(DocumentVisitor visitor)
Parameters
visitor
DocumentVisitor
Објекат класе потиче из Aspose.Note.DocumentVisitor.
АппендицхилдПрви<т1>(T1)
Додајте чвор на предњи део листе дечијих чворова за овај узрок.
public virtual T1 AppendChildFirst<t1>(T1 newChild) where T1 : T
Parameters
newChild
T1
Нод да додају.
Returns
T1
Додаје се додатни чвор.
Типови параметара
T1
Точни тип аплицираног чворова.
АппендицхилдЛаст(T1)
Додајте чвор до краја листе дечијих чворова за овај чврст.
public virtual T1 AppendChildLast<t1>(T1 newChild) where T1 : T
Parameters
newChild
T1
Нод да додају.
Returns
T1
Додаје се додатни чвор.
Типови параметара
T1
Точни тип аплицираног чворова.
GetChildNodes(NodeType)
Добијте све дечије чворове по типу чвора.
[Obsolete("Use GetChildNodes<t>() method instead.")]
public override List<inode> GetChildNodes(NodeType type)
Parameters
type
NodeType
То је тип нода.
Returns
Списак дечијих чворова.
ГетцхилдНодс()
Добијте све дечије чворове по типу чвора.
public override List<t1> GetChildNodes<t1>() where T1 : class, INode
Returns
Списак дечијих чворова.
Типови параметара
T1
Тип елемената у враћеном листу.
Examples
Показује како добити слику из документа.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Images();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "Aspose.one");
// Get all Image nodes
IList<aspose.note.image> nodes = oneFile.GetChildNodes<aspose.note.image>();
foreach (Aspose.Note.Image image in nodes)
{
using (MemoryStream stream = new MemoryStream(image.Bytes))
{
using (Bitmap bitMap = new Bitmap(stream))
{
// Save image bytes to a file
bitMap.Save(String.Format(dataDir + "{0}", Path.GetFileName(image.FileName)));
}
}
}</aspose.note.image></aspose.note.image>
Показује како добити мета информације слике.
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Images();
// Load the document into Aspose.Note.
Document oneFile = new Document(dataDir + "Aspose.one");
// Get all Image nodes
IList<aspose.note.image> images = oneFile.GetChildNodes<aspose.note.image>();
foreach (Aspose.Note.Image image in images)
{
Console.WriteLine("Width: {0}", image.Width);
Console.WriteLine("Height: {0}", image.Height);
Console.WriteLine("OriginalWidth: {0}", image.OriginalWidth);
Console.WriteLine("OriginalHeight: {0}", image.OriginalHeight);
Console.WriteLine("FileName: {0}", image.FileName);
Console.WriteLine("LastModifiedTime: {0}", image.LastModifiedTime);
Console.WriteLine();
}</aspose.note.image></aspose.note.image>
GetEnumerator()
Враћа списак који итерира кроз дечије чворове Aspose.Note.CompositeNode`1.
public IEnumerator<t> GetEnumerator()
Returns
ИУНМЕРАТОР1 for the Aspose.Note.CompositeNode
1.
Инсертцхилд(Т1, Т1)
Унесите чвор на одређеном положају у листу дечијих чворова за овај чврст.
public virtual T1 InsertChild<t1>(int i, T1 newChild) where T1 : T
Parameters
i
int
Позиција за убацивање
newChild
T1
Нод за убацивање.
Returns
T1
Додаје се додатни чвор.
Типови параметара
T1
Точни тип уграђеног чворова.
InsertChildrenRange(int, IEnumerable)
Унесите секвенцију чворова, почевши од одређеног положаја, у листу дечијих чвора за овај чвор.
public void InsertChildrenRange(int i, IEnumerable<t> newChildren)
Parameters
i
int
Позиција за убацивање
newChildren
IEnumerable
Постоји серија чворова која треба унети.
InsertChildrenRange(Т, парамс Т[])
Унесите секвенцију чворова, почевши од одређеног положаја, у листу дечијих чвора за овај чвор.
public void InsertChildrenRange(int i, params T[] newChildren)
Parameters
i
int
Позиција за убацивање
newChildren
Т [ ]
Постоји серија чворова која треба унети.
Прекидач(T1)
Уклоните дечији чвор.
public T1 RemoveChild<t1>(T1 oldChild) where T1 : T
Parameters
oldChild
T1
Нод за уклањање.
Returns
T1
Уклоњени чвор.
Типови параметара
T1
Точни тип уклоњеног чворова.