사용자 정의 및 내장 속성을 읽는 방법
C ++ 용 작업장에서 사용자 정의 속성은 Project 클래스에 제공된 get_customprops를 사용하여 액세스 할 수있는 유형의 컬렉션 CustomProjectPropertyCollection을 통해 사용할 수있는 반면, 내장 특성은 [BuiltinProjectTyCollection]을 나타내는 Get_BuiltInProps를 사용하여 사용할 수 있습니다 (3).
1// The path to the documents directory.
2System::String dataDir = RunExamples::GetDataDir(System::Reflection::MethodBase::GetCurrentMethod(ASPOSE_CURRENT_FUNCTION)->get_DeclaringType().get_FullName());
3
4// Create a project reader instance
5System::SharedPtr<Project> project = System::MakeObject<Project>(dataDir + u"ReadProjectInfo.mpp");
6
7// Built-in properties are available directly:
8System::Console::WriteLine(u"Author: " + project->get_BuiltInProps()->get_Author());
9System::Console::WriteLine(u"Category: " + project->get_BuiltInProps()->get_Category());
10System::Console::WriteLine(u"Comments: " + project->get_BuiltInProps()->get_Comments());
11System::Console::WriteLine(u"Company: " + project->get_BuiltInProps()->get_Company());
12System::Console::WriteLine(u"HyperlinkBase: " + project->get_BuiltInProps()->get_HyperlinkBase());
13System::Console::WriteLine(u"IsReadOnly: " + project->get_BuiltInProps()->get_IsReadOnly());
14System::Console::WriteLine(u"Keywords: " + project->get_BuiltInProps()->get_Keywords());
15System::Console::WriteLine(u"Manager: " + project->get_BuiltInProps()->get_Manager());
16System::Console::WriteLine(u"Subject: " + project->get_BuiltInProps()->get_Subject());
17System::Console::WriteLine(u"Title: " + project->get_BuiltInProps()->get_Title());