Aspose.note 1.4.0のパブリックAPIの変更

このドキュメントでは、モジュール/アプリケーション開発者にとって興味深いかもしれないバージョン1.3から1.4のAspose.Aspose.APIへの変更について説明しています。これには、新しい更新されたパブリック方法だけでなく、Asops.noteの舞台裏の行動の変化の説明も含まれています。

OneNoteドキュメントノードを取得するための新しいアプローチ

タイプごとにノードを取得するための新しい方法が開発され、より柔軟なアプローチを提供し、型キャストを避けました。 古いサンプルコード(.net、c#):

C#

1 // OneNoteドキュメントをロードします
2 Aspose.note.document onefile = new Aspose.note.document(@"test.one");
3 
4 // richtextタイプノードを取得します
5 ilist <node> richtextnodes = onefile.getChildNodes(aspose.note.nodetype.richtext);
6 
7 //コレクションから特定のノードを取得します
8 aspose.note.richText firstTextNode =(aspose.note.richText)richtextNodes [0];

新しいサンプルコード(.net、c#):

C#

1 // OneNoteドキュメントをロードします
2 Aspose.note.document onefile = new Aspose.note.document(@"test.one");
3 
4 // richtextタイプノードを取得します
5 ilist <richtext> richtextnodes = onefile.getChildNodes <RichText>();
6 
7 //コレクションから特定のノードを取得します
8 aspose.note.richtext firstTextNode = richTextNodes [0];
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.