語言

PackageRelationshipSelector 建構函式

定義

初始化 PackageRelationshipSelector 類別的新執行個體。

public:
 PackageRelationshipSelector(Uri ^ sourceUri, System::IO::Packaging::PackageRelationshipSelectorType selectorType, System::String ^ selectionCriteria);
public PackageRelationshipSelector(Uri sourceUri, System.IO.Packaging.PackageRelationshipSelectorType selectorType, string selectionCriteria);
new System.IO.Packaging.PackageRelationshipSelector : Uri * System.IO.Packaging.PackageRelationshipSelectorType * string -> System.IO.Packaging.PackageRelationshipSelector
Public Sub New (sourceUri As Uri, selectorType As PackageRelationshipSelectorType, selectionCriteria As String)

參數

sourceUri
Uri

擁有該關係的統一資源識別碼(URI) PackagePartPackage 或 (SourceUri=“/”) 的識別碼。

selectorType
PackageRelationshipSelectorType

的類型 selectionCriteria,可以依關係 Id 或關係 Type來決定。

selectionCriteria
String

用來根據 選擇關係 selectorType的資格字串。

例外狀況

sourceUri 或 selectionCriteria 為 null。

這個 selectorType 參數並不成立。

該 selectorType 參數是 Id 但 selectionCriteria 不是有效的 XML 架構定義(XSD)識別碼(ID)。

對於指定的 selectionCriteria,該 selectorType 不適用。

-或-

這 sourceUri 不是 Package 根(「/」),也不是有效的 PackagePart URI。

適用於

另請參閱