PropertyCollection class

表示屬性及其值的集合。

屬性

keys

取得屬性集合中的索引鍵。

方法

clone()

複製集合。

getProperty(string | PropertyId, string | number | boolean)

傳回 String 類型的屬性值。 目前只允許 String、int 和 bool。 如果名稱無法使用,則會傳回指定的 defaultValue。

mergeTo(PropertyCollection)

將這組屬性合併到另一組屬性,不覆寫。

setProperty(string | PropertyId, string)

設定名稱所指定之參數的 String 值。

屬性詳細資料

keys

取得屬性集合中的索引鍵。

string[] keys

屬性值

string[]

集合中的索引鍵。

方法詳細資料

clone()

複製集合。

function clone(): PropertyCollection

傳回

集合的複本。

getProperty(string | PropertyId, string | number | boolean)

傳回 String 類型的屬性值。 目前只允許 String、int 和 bool。 如果名稱無法使用,則會傳回指定的 defaultValue。

function getProperty(key: string | PropertyId, def?: string | number | boolean): string

參數

key

string | PropertyId

參數名稱。

def

string | number | boolean

如果集合中沒有參數,則會傳回的預設值。

傳回

string

參數的值。

mergeTo(PropertyCollection)

將這組屬性合併到另一組屬性,不覆寫。

function mergeTo(destinationCollection: PropertyCollection)

參數

destinationCollection
PropertyCollection

要合併到的集合。

setProperty(string | PropertyId, string)

設定名稱所指定之參數的 String 值。

function setProperty(key: string | PropertyId, value: string)

參數

key

string | PropertyId

參數名稱。

value

string

參數的值。